Re: [HACKERS] many copies of atooid() and oid_cmp() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] many copies of atooid() and oid_cmp()
Date
Msg-id 13899.1484231765@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] many copies of atooid() and oid_cmp()  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: [HACKERS] many copies of atooid() and oid_cmp()  (Michael Paquier <michael.paquier@gmail.com>)
Re: [HACKERS] many copies of atooid() and oid_cmp()  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> On 1/11/17 11:25 PM, Tom Lane wrote:
>> +1 for the concept, but I'm a bit worried about putting atooid() in
>> postgres_ext.h.  That's going to impose on the namespace of libpq-using
>> applications, for instance.  A more conservative answer would be to
>> add it to c.h.  OTOH, postgres_ext.h is where the Oid typedef lives,
>> so I do see the consistency of adding this there.  Hard choice.

> How about two copies: one in postgres_fe.h and one in postgres.h?

That seems uglier than either of the other choices.

I don't personally have a huge problem with adding atooid in
postgres_ext.h, but I thought I'd better flag the potential issue
to see if anyone else thinks it's a big problem.

>> The oid_cmp() move looks fine if we only need it on the server side.
>> But doesn't pg_dump have one too?

> The pg_dump one isn't a qsort comparator, though.

OK.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] [PATCH] Rename pg_switch_xlog to pg_switch_wal
Next
From: Jesper Pedersen
Date:
Subject: Re: [HACKERS] Retiring from the Core Team