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 7357.1484195124@sss.pgh.pa.us
Whole thread Raw
In response to [HACKERS] many copies of atooid() and oid_cmp()  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses 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:
> There are approximately 11 copies of atooid() and 3 of oid_cmp() or
> equivalent, and pending patches are proposing to add more.  I propose
> these two patches to collect them in central places.

+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.

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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Passing query string to workers
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Couple of issues with prepared FETCH commands