Re: Variadic parameters vs parameter defaults

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Brendan Jurd" <direvus(at)gmail(dot)com>
Subject: Re: Variadic parameters vs parameter defaults
Date: 2008-12-17 18:32:41
Message-ID: 200812172032.41794.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-12-17 18:40:04 Re: Variadic parameters vs parameter defaults
Previous Message Tom Lane 2008-12-17 18:32:00 Re: Variadic parameters vs parameter defaults