Andres Freund <andres@anarazel.de> writes:
> In my understanding FunctionCallInfoData is basically per-call data,
> whereas FmgrInfo is information about the function. It makes some sense
> that ->context is in FunctionCallInfoData, after all it's used for
> per-row data like the trigger context. But we don't really change the
> collation of function invocations per-call. Thus I don't quite get why
> FunctionCallInfoData contains information about it rather than FmgrInfo.
[squint] I would say that the call collation is an argument, not a
property of the function, and therefore is correctly located in
FunctionCallInfoData.
It's true that we often abuse fn_extra to hold data that's essentially
call-site-dependent, but I don't think that's a good reason to push
collation into FmgrInfo.
regards, tom lane