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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: minor: contrib/btree_gin/btree_gin.c uses DirectFunctionCall3(inet_in,..)
Дата
Msg-id 31008.1415987958@sss.pgh.pa.us
обсуждение исходный текст
Ответ на minor: contrib/btree_gin/btree_gin.c uses DirectFunctionCall3(inet_in,..)  (Jon Nelson <jnelson+pgsql@jamponi.net>)
Ответы Re: minor: contrib/btree_gin/btree_gin.c uses DirectFunctionCall3(inet_in,..)  (Jon Nelson <jnelson+pgsql@jamponi.net>)
Список pgsql-bugs
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.

            regards, tom lane

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

Предыдущее
От: Jon Nelson
Дата:
Сообщение: 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,..)