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 17:47:14
Message-ID: 200812171947.15571.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:
> This method
> eliminates the discrepancy between anyarray and other types of variadic
> parameters, 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?

I think it is a mistake to consider this a default value issue at all. If you
pass zero arguments to a function, the function should get zero.

Or why would you pass <> N arguments when N are provided for any N?

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2008-12-17 17:55:36 Re: Variadic parameters vs parameter defaults
Previous Message Peter Eisentraut 2008-12-17 17:45:28 Re: Variadic parameters vs parameter defaults