Re: [HACKERS] datetime.h defines like PM conflict with external libraries - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] datetime.h defines like PM conflict with external libraries
Date
Msg-id 30609.1507063386@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] datetime.h defines like PM conflict with externallibraries  (Andres Freund <andres@anarazel.de>)
Responses Re: [HACKERS] datetime.h defines like PM conflict with externallibraries
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2017-10-03 16:34:38 -0400, Andrew Dunstan wrote:
>> AFAICT at a quick glance these are only used in a couple of files. Maybe
>> the defs need to be floated off to a different header with more limited
>> inclusion?

> Why not just rename them to PG_PM etc? If we force potential external
> users to do some changes, we can use more unique names just as well -
> the effort to adapt won't be meaningfully higher... IMNSHO there's not
> much excuse for defining macros like PM globally.

I like the new-header-file idea because it will result in minimal code
churn and thus minimal back-patching hazards.

I do *not* like "PG_PM".  For our own purposes that adds no uniqueness
at all.  If we're to touch these symbols then I'd go for names like
"DATETIME_PM".  Or maybe "DT_PM" ... there's a little bit of precedent
for the DT_ prefix already.
        regards, tom lane


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

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] datetime.h defines like PM conflict with externallibraries
Next
From: Nico Williams
Date:
Subject: Re: [HACKERS] [PATCH] WIP Add ALWAYS DEFERRED option for constraints