Peter Eisentraut <pete...@gmx.net> writes:
> Another point against that: If you wanted something else besides an empty 
> array as "default", you can handle that inside the function body by just 
> looking at how many arguments were passed.  Using the default mechanism 
> provides no added functionality.

Well, the entire default mechanism provides "no additional
functionality", since you can always emulate it with a nest of functions
(or a single function that is able to accept a varying argument list and
look at how many arguments were passed; which, please note, is not
allowed in any of the existing PLs).  What we're looking for here is a
convenient notational tradeoff.  The behavior at zero arguments is
certainly a judgment call, but it seems to me that we'll wind up with
more warts and less flexibility if we try to make the system install a
default behavior for that case.

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to