On Thu, Oct 9, 2014 at 8:29 AM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
> On Thu, Oct 9, 2014 at 6:26 AM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
> wrote:
>> However, if I were to do it, I would instead create a quote.h file and
>> would also add the quote_literal_cstr() prototype to it, perhaps even
>> move the implementations from their current ruleutils.c location to
>> quote.c. (Why is half the stuff in ruleutils.c rather than quote.c is
>> beyond me.)
>
> Yes, an extra header file would be cleaner. Now if we are worried about
> creating much incompatibilities with existing extension (IMO that's not
> something core should worry much about), then it is better not to do it.
> Now, if I can vote on it, I think it is worth doing in order to have
> builtins.h only contain only Datum foo(PG_FUNCTION_ARGS), and move all the
> quote-related things in quote.c.
The attached patch implements this idea, creating a new header quote.h
in include/utils that groups all the quote-related functions. This
makes the code more organized.
Regards,
--
Michael