From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jon Nelson <jnelson+pgsql@jamponi.net>
Cc: pgsql-bugs@postgresql.org
Subject: Re: minor: contrib/btree_gin/btree_gin.c uses DirectFunctionCall3(inet_in, ..)
Date: Fri, 14 Nov 2014 12:59:18 -0500
Message-ID: <31008.1415987958@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKuK5J1WQX_dt8pF4zfmvyH79gC9suT46seo92prJOHAYMq-WQ@mail.gmail.com>
References: <CAKuK5J1WQX_dt8pF4zfmvyH79gC9suT46seo92prJOHAYMq-WQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, jnelson+pgsql@jamponi.net
Subject: Re: minor: contrib/btree_gin/btree_gin.c uses DirectFunctionCall3(inet_in, ..)
In-Reply-To: <31008.1415987958@sss.pgh.pa.us>
References: <CAKuK5J1WQX_dt8pF4zfmvyH79gC9suT46seo92prJOHAYMq-WQ@mail.gmail.com> <31008.1415987958@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox