From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Johnston <david.g.johnston@gmail.com>
Cc: pgsql-docs@postgresql.org <pgsql-docs@postgresql.org>
Subject: Re: Add Optional Variadic Invocation Explanation to 35.4.5 (xfunc-sql)
Date: Sun, 21 Dec 2014 15:35:36 -0500
Message-ID: <15559.1419194136@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwaomm_7N9Y_9pd43eXgMyQxzogtjD4CJxjaxk05QsF1pw@mail.gmail.com>
References: <CAKFQuwaomm_7N9Y_9pd43eXgMyQxzogtjD4CJxjaxk05QsF1pw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-docs>
David Johnston <david.g.johnston@gmail.com> writes:
> This:
> http://www.postgresql.org/docs/9.4/static/xfunc-sql.html
> Describes how to invoke a function defined with VARIADIC with an actual
> array as input instead of supplying ONE-or-more individual arguments to the
> call.
Right, and it does specifically say that there must be at least one
actual argument matching the VARIADIC parameter. Still, an example
to clarify that isn't a bad idea.
> AFAICS the only way to get the called function to see an empty array is to
> call it like:
> SELECT varchar('text fixed 1', VARIADIC ARRAY[]::text[])
> While this is a logical solution to the problem, given the above knowledge,
> it would be nice if both points were made explicitly in the documentation
> in the section linked above.
I did not like your proposed wording, as it seemed to complicate matters
unduly by treating two independent points in the same para. I went with
just adding a separate para instead:
http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=699300a146c04e207a8fdec407538cdf53...
regards, tom lane
--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
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 using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com
Subject: Re: Add Optional Variadic Invocation Explanation to 35.4.5 (xfunc-sql)
In-Reply-To: <15559.1419194136@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