Re: datetime.h defines like PM conflict with external libraries

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: datetime.h defines like PM conflict with external libraries
Date: 2017-10-04 09:36:56
Message-ID: 20171004093656.odwf7s7ihvacnzbq@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan wrote:

> On 10/03/2017 04:43 PM, Tom Lane wrote:

> > 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.
>
> Yeah. If we use a prefix +1 for DT_. If we do that then I think they
> should *all* be prefixed, not just the ones we know of conflicts for.

Maybe it'd be good idea to unify some of that stuff so that ecpg can use
it, too? Having a second copy of the same stuff in
src/interfaces/ecpg/pgtypeslib/dt.h is pretty terrible. Even if not,
let's make sure they don't diverge.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2017-10-04 09:40:57 Re: [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple
Previous Message Magnus Hagander 2017-10-04 09:24:01 Re: list of credits for release notes