On Fri, Sep 13, 2019 at 1:01 AM Alvaro Herrera <alvhe...@2ndquadrant.com> wrote: > > This v6 is just Fabien's v5, rebased over a very minor conflict, and > pgindented. No further changes. I've marked this Ready for Committer. > Should we add function header for the below function to maintain the common standard of this file: + +static void +AppendNoticeMessage(void *arg, const char *msg) +{ + t_notice_messages *notes = (t_notice_messages *) arg; + + appendPQExpBufferStr(notes->in_flip ? ¬es->flip : ¬es->flop, msg); +} + +static void +ShowNoticeMessage(t_notice_messages *notes) +{ + PQExpBufferData *current = notes->in_flip ? ¬es->flip : ¬es->flop; + + if (current->data != NULL && *current->data != '\0') + pg_log_info("%s", current->data); + resetPQExpBuffer(current); +} + +/* + * SendQueryAndProcessResults: utility function for use by SendQuery() only + *
+static void +ShowErrorMessage(const PGresult *result) +{ + const char *error = PQerrorMessage(pset.db); + + if (strlen(error)) + pg_log_info("%s", error); + + CheckConnection(); +} Regards, Vignesh EnterpriseDB: http://www.enterprisedb.com