On 10/16/2014 08:08 AM, Andres Freund wrote:
On 2014-10-16 08:04:17 -0400, Jan Wieck wrote:
Hi,

PostgreSQL has for ages defined INT64_FORMAT and UINT64_FORMAT in
pg_config.h. This commit

http://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=ce486056ecd28050

moved those definitions to c.h, which breaks compilation of all released
Slony-I versions against current master. Can those be moved back to where
they used to be?
Well, you could add additional configure stuff to also emit what you
want.

Slony uses the definitions in external tools, like slon and slonik, to
format sequence numbers in log output.
Then it should include c.h/postgres_fe.h?

So the header of c.h says "Note that the definitions here are not intended to be exposed to clients"
but
postgres_fe.h says "This should be the first file included by PostgreSQL client libraries and"

Should client programs that live outside the postgres source tree be including postgres_fe.h ? I have a feeling the answer is no. If the answer is no, then why does a make install install postgres_fe.h ?

Slonik used to include postgre_fe.h but back in 2011 or so we stopped doing so because it was causing issues (I think on win32 builds)

Maybe slony client programs shouldn't be trying to steal portability definitions from postgres headers, but I doubt we are the only ones doing that. It isn't a big deal for slony to define it's own INT64_FORMAT for 9.5+ but third party projects that have been including pg_config.h will hit similar issues. if there was good reason for the change then fine (Postgres isn't intended to be a general purpose C portability layer).



Steve

Greetings,

Andres Freund




--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to