On Mon, Oct 13, 2014 at 9:24 AM, Michael Paquier
<michael.paqu...@gmail.com> wrote:
> That's a 2/2 tie then AFAIK: Noah and Stephen express concerns about
> the breakage, you and I would be fine with a clear breakage to make
> code more organized (correct me if you don't feel this way).

Well, I think that the long-standing agglomeration of prototypes from
many header files into builtins.h is kind of a wart.  But I also think
that it's a justified wart, to the extent that we wish to avoid
creating many header files with only a tiny handful of prototypes.  So
I'm not in a tremendous hurry to change it, but I'm OK with changing
it if other people feel there's a benefit.  The main reason to
separate out quote.h, AIUI, is that unlike a lot of the stuff in
builtins.h, those functions are actually called from quite a few
places.

>> What I find strange about the actual patch is that it moves some but
>> not all of the prototypes for the stuff that ends up in quote.c into
>> quote.h.  That doesn't seem right.
> Are you referring to the Datum quote_*(PG_FUNCTION_ARGS) that are
> still let in builtins.h? That was let on purpose to let all the SQL
> functions within builtins.h but I'd be happy to move everything to
> quote.h to make the separation clearer.

IMHO, putting some prototypes for a .c file in one header and others
in another header is going to make it significantly harder to figure
out which files you need to #include when. Keeping a simple rule there
seems essential to me.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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