Re: Add PQsendSyncMessage() to libpq

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Anton Kirilov <antonvkirilov(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add PQsendSyncMessage() to libpq
Date: 2023-07-05 20:45:26
Message-ID: 6371FA84-3F22-4682-B7D9-D3D0EDB9CA50@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 21 May 2023, at 19:17, Anton Kirilov <antonvkirilov(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tristan Partin 2023-07-05 20:53:16 Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG
Previous Message Tristan Partin 2023-07-05 20:45:11 Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG