Re: minor: contrib/btree_gin/btree_gin.c uses DirectFunctionCall3(inet_in,..)

Поиск
Список
Период
Сортировка
От Jon Nelson
Тема Re: minor: contrib/btree_gin/btree_gin.c uses DirectFunctionCall3(inet_in,..)
Дата
Msg-id CAKuK5J3QZpMr+5=2yGqgRCyFSCp8-nAfFJx593A7Zkiqe7k2wQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: minor: contrib/btree_gin/btree_gin.c uses DirectFunctionCall3(inet_in,..)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: minor: contrib/btree_gin/btree_gin.c uses DirectFunctionCall3(inet_in,..)  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-bugs
On Fri, Nov 14, 2014 at 11:59 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Jon Nelson <jnelson+pgsql@jamponi.net> writes:
>> contrib/btree_gin/btree_gin.c uses DirectFunctionCall3(inet_in,..)
>> instead of DirectFunctionCall1(inet_in, one_argument).
>
>> That doesn't seem right. Does such a thing matter?
>
> It's not really incorrect: in a call going through InputFunctionCall(),
> which is the normal path, the two extra arguments would be provided
> whether the specific datatype input function needed them or not.
>
> However, I think the usual convention for DirectFunctionCall() usage
> is to pass exactly what the target function uses, since you know
> exactly what you're calling.  Certainly that's what happens in the
> two direct calls to inet_in in the core code.
>
> So I tend to agree that we should change this call to match the others,
> but it's purely cosmetic.

So, are there any additional steps that you might recommend that I take?
It's such a trivial thing. I could provide a patch, of course, or a
pull request off of github if people use that.


--
Jon

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: minor: contrib/btree_gin/btree_gin.c uses DirectFunctionCall3(inet_in,..)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [DOCS] BUG #11661: CASE ELSE is evaluated although condition is true