Re: Warning is adjusted of pgbench.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>
Cc: "Magnus Hagander" <magnus(at)hagander(dot)net>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Warning is adjusted of pgbench.
Date: 2007-09-26 01:38:09
Message-ID: 10952.1190770689@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

"Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp> writes:
>> Why do you need to #undef EXEC_BACKEND, and is there a specific reason for
>> removing the include of win32.h?

> I put in in order to avoid -D of the Makefile.

If that matters, the problem is that somebody put the wrong stuff in the
wrong include file. Backend-only things ought to go in postgres.h not
c.h. In particular this is wrongly placed:

/* EXEC_BACKEND defines */
#ifdef EXEC_BACKEND
#define NON_EXEC_STATIC
#else
#define NON_EXEC_STATIC static
#endif

but AFAICS it doesn't affect anything that pgbench would care about.
So I'm wondering *exactly* what goes wrong if you don't #undef
EXEC_BACKEND in pgbench.

As for the FRONTEND #define, that seems essential on Windows (and on no
other platform) because port/win32.h uses it. But putting the #define
into pgbench.c (and by implication into anything else we build on
Windows) sure seems like a broken approach. Where else could we put it?
It looks like right now that's left to the build system, which might or
might not be a good idea, but if it is a good idea then pgbench must be
getting missed. Perhaps instead postgres_fe.h should #define FRONTEND?

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Hiroshi Saito 2007-09-26 02:46:28 Re: Warning is adjusted of pgbench.
Previous Message Tom Lane 2007-09-26 00:47:54 Re: Optimizer hook