Re: pgsql: Implement pipeline mode in libpq

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: pgsql: Implement pipeline mode in libpq
Дата
Msg-id CAApHDvqTTgDm38s4HRj03nhzhzQ1oMOj-RXFUB1pE6Bj07jyuQ@mail.gmail.com
обсуждение исходный текст
Ответ на pgsql: Implement pipeline mode in libpq  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: pgsql: Implement pipeline mode in libpq  (David Rowley <dgrowleyml@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: David Rowley
Дата:
Сообщение: pgsql: Allow users of simplehash.h to perform direct deletions
Следующее
От: David Rowley
Дата:
Сообщение: pgsql: Fix compiler warning in unistr function