Re: Why is fncollation in FunctionCallInfoData rather than fmgr_info?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Why is fncollation in FunctionCallInfoData rather than fmgr_info?
Дата
Msg-id 9136.1528261309@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Why is fncollation in FunctionCallInfoData rather than fmgr_info?  (Andres Freund <andres@anarazel.de>)
Ответы Re: Why is fncollation in FunctionCallInfoData rather than fmgr_info?  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: Loaded footgun open_datasync on Windows
Следующее
От: David Rowley
Дата:
Сообщение: Re: why partition pruning doesn't work?