Re: minor: contrib/btree_gin/btree_gin.c uses DirectFunctionCall3(inet_in,..) - Mailing list pgsql-bugs

From Tom Lane
Subject Re: minor: contrib/btree_gin/btree_gin.c uses DirectFunctionCall3(inet_in,..)
Date
Msg-id 31008.1415987958@sss.pgh.pa.us
Whole thread Raw
In response to minor: contrib/btree_gin/btree_gin.c uses DirectFunctionCall3(inet_in,..)  (Jon Nelson <jnelson+pgsql@jamponi.net>)
Responses Re: minor: contrib/btree_gin/btree_gin.c uses DirectFunctionCall3(inet_in,..)  (Jon Nelson <jnelson+pgsql@jamponi.net>)
List 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 by date:

Previous
From: Jon Nelson
Date:
Subject: minor: contrib/btree_gin/btree_gin.c uses DirectFunctionCall3(inet_in,..)
Next
From: Jon Nelson
Date:
Subject: Re: minor: contrib/btree_gin/btree_gin.c uses DirectFunctionCall3(inet_in,..)