Re: pgsql: Implement pipeline mode in libpq - Mailing list pgsql-committers

From David Rowley
Subject Re: pgsql: Implement pipeline mode in libpq
Date
Msg-id CAApHDvqTTgDm38s4HRj03nhzhzQ1oMOj-RXFUB1pE6Bj07jyuQ@mail.gmail.com
Whole thread Raw
In response to pgsql: Implement pipeline mode in libpq  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: pgsql: Implement pipeline mode in libpq  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-committers
Hi Alvaro,

On Tue, 16 Mar 2021 at 10:20, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>
> Implement pipeline mode in libpq

> src/test/modules/libpq_pipeline/libpq_pipeline.c   | 1303 ++++++++++++++++++++

I'm wondering if you meant to leave the "#define DEBUG" line at line
34 in the above file?

It seems pretty strange to do:

#define DEBUG
#ifdef DEBUG
#define pg_debug(...)  do { fprintf(stderr, __VA_ARGS__); } while (0)
#else
#define pg_debug(...)
#endif

pg_debug will never be an empty macro.

I noticed this when testing compiling postgres with MSVC. The compiler
is kicking out a warning: 'DEBUG': macro redefinition, which will be
because that compiler defines DEBUG when doing non-production builds.

David



pgsql-committers by date:

Previous
From: David Rowley
Date:
Subject: pgsql: Allow users of simplehash.h to perform direct deletions
Next
From: David Rowley
Date:
Subject: pgsql: Fix compiler warning in unistr function