public inbox for [email protected]
help / color / mirror / Atom feedFrom: Jelte Fennema-Nio <[email protected]>
To: Michael Paquier <[email protected]>
Cc: Anthonin Bonnefoy <[email protected]>
Cc: Anton Kirilov <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: [email protected]
Subject: Re: Add PQsendSyncMessage() to libpq
Date: Mon, 15 Jan 2024 10:01:59 +0100
Message-ID: <CAGECzQRwkYVzAD3S3u2PYt5E16xZKqL0nUYQXZ05tO=pCAdcKA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<CAO6_Xqo_H3-ykt_Hmip-TKNBVWZbRthLvFu4qTpQSSEgV4dWmA@mail.gmail.com>
<CAGECzQQqkkvSko4fZUBAmVMd=VmC4nXdyOBO=s_42HzKJ=GaEA@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
On Mon, 15 Jan 2024 at 08:50, Michael Paquier <[email protected]> wrote:
> Yeah, I'll go with that after a second look. Attached is what I am
> finishing with, and I have reproduced some numbers with the pgbench
> metacommand mentioned upthread, which is reeeaaally nice.
Code looks good to me. But one small notes on the test.
+ /* second pipeline */
+ if (PQsendQueryParams(conn, "SELECT $1", 1, dummy_param_oids,
+ dummy_params, NULL, NULL, 0) != 1)
+ pg_fatal("dispatching first SELECT failed: %s",
PQerrorMessage(conn));
Error message should be "second SELECT" not "first SELECT". Same note
for the error message in the third pipeline, where it still says
"second SELECT".
+ res = PQgetResult(conn);
+ if (res == NULL)
+ pg_fatal("PQgetResult returned null when there's a
pipeline item: %s",
+ PQerrorMessage(conn));
+
+ if (PQresultStatus(res) != PGRES_TUPLES_OK)
+ pg_fatal("Unexpected result code %s from first pipeline item",
+ PQresStatus(PQresultStatus(res)));
+ PQclear(res);
+ res = NULL;
+
+ if (PQgetResult(conn) != NULL)
+ pg_fatal("PQgetResult returned something extra after first result");
same issue: s/first/second/g (and s/second/third/g for the existing
part of the test).
view thread (15+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Add PQsendSyncMessage() to libpq
In-Reply-To: <CAGECzQRwkYVzAD3S3u2PYt5E16xZKqL0nUYQXZ05tO=pCAdcKA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox