Re: Add PQsendSyncMessage() to libpq - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Add PQsendSyncMessage() to libpq
Date
Msg-id 6371FA84-3F22-4682-B7D9-D3D0EDB9CA50@yesql.se
Whole thread Raw
In response to Re: Add PQsendSyncMessage() to libpq  (Anton Kirilov <antonvkirilov@gmail.com>)
Responses Re: Add PQsendSyncMessage() to libpq
List pgsql-hackers
> On 21 May 2023, at 19:17, Anton Kirilov <antonvkirilov@gmail.com> wrote:

> .. here is an updated version of the patch

This hunk here:

-    if (PQflush(conn) < 0)
+    const int ret = flags & PG_PIPELINEPUTSYNC_FLUSH ? PQflush(conn) : 0;
+
+    if (ret < 0)

..is causing this compiler warning:

fe-exec.c: In function ‘PQpipelinePutSync’:
fe-exec.c:3203:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
3203 | const int ret = flags & PG_PIPELINEPUTSYNC_FLUSH ? PQflush(conn) : 0;
     | ^~~~~
cc1: all warnings being treated as errors

Also, the patch no longer applies. Please rebase and send an updated version.

--
Daniel Gustafsson




pgsql-hackers by date:

Previous
From: Fabrízio de Royes Mello
Date:
Subject: Re: Including a sample Table Access Method with core code
Next
From: "Tristan Partin"
Date:
Subject: Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG