Re: Variadic parameters vs parameter defaults - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Variadic parameters vs parameter defaults
Date
Msg-id 200812172032.41794.peter_e@gmx.net
Whole thread Raw
In response to Re: Variadic parameters vs parameter defaults  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Variadic parameters vs parameter defaults
List pgsql-hackers
On Wednesday 17 December 2008 06:03:06 Tom Lane wrote:
> and it leaves the door open for someone to use something
> besides an empty array as the default.  (Who are we to say that such a
> thing is never useful?  NULL seems like a possibly useful default for
> instance.)

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.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Variadic parameters vs parameter defaults
Next
From: Tom Lane
Date:
Subject: Re: Variadic parameters vs parameter defaults