Andrew Dunstan <> writes:
> On 02/24/2017 05:34 PM, Andrew Dunstan wrote:
>> It's occurred to me that we could reduce the code clutter in fmgr.c a
>> bit by turning the DirectFunctionCall{n]Coll functions into macros
>> calling these functions and passing NULL as the flinfo param.

> here's a patch along those lines. If there's agreement on this I can
> finish up the work on btree_gist and btree_gin supoport for enums.

I'm not really thrilled with doing it like that, for two reasons:

1. This makes it look like CallerFInfoFunctionCallN is the more basic,
common interface, which it isn't and never will be.  At best, that's
confusing.  And I don't like having only one documentation block
covering both interfaces; that does nothing for clarity either.

2. By my count there are over 500 uses of DirectFunctionCallN in the
backend.  This will add an additional hidden parameter to each one,
implying code bloat and some fractional speed cost.

I think it'd be better to leave DirectFunctionCallN alone and just invent
a small number of CallerFInfoFunctionCallN support functions (maybe N=1
and N=2 would be enough, at least for now).

                        regards, tom lane

Sent via pgsql-hackers mailing list (
To make changes to your subscription:

Reply via email to