Re: psql - add SHOW_ALL_RESULTS option

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, daniel(at)manitou-mail(dot)org, peter(dot)eisentraut(at)2ndquadrant(dot)com, iwata(dot)aya(at)jp(dot)fujitsu(dot)com, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: psql - add SHOW_ALL_RESULTS option
Date: 2019-09-20 03:53:26
Message-ID: CALDaNm2d7VUD3pY3_QyihhR2rL+3JCtiRKXnOvX4VfhF-KSz4w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 13, 2019 at 1:01 AM Alvaro Herrera <alvherre(at)2ndquadrant(dot)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 ? &notes->flip : &notes->flop, msg);
+}
+
+static void
+ShowNoticeMessage(t_notice_messages *notes)
+{
+ PQExpBufferData *current = notes->in_flip ? &notes->flip : &notes->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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-09-20 04:07:24 Re: Add "password_protocol" connection parameter to libpq
Previous Message Amit Kapila 2019-09-20 03:32:01 Re: pgbench - allow to create partitioned tables