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

From Jeff Davis
Subject Re: Variadic parameters vs parameter defaults
Date
Msg-id 1229537863.26139.24.camel@dell.linuxdev.us.dell.com
Whole thread Raw
In response to Re: Variadic parameters vs parameter defaults  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Variadic parameters vs parameter defaults
List pgsql-hackers
On Wed, 2008-12-17 at 19:43 +0200, Peter Eisentraut wrote:
> That looks like a bug to me.  Anything that you can do with 1 to N items 
> should also work for zero.
> 

Previous discussion link:

http://archives.postgresql.org/pgsql-patches/2008-07/msg00149.php

You can make either mechanism do what you want by defining the right set
of functions. If a minimum of one argument per variadic parameter is
required, you can work around it by defining an extra function with no
variadic parameter to handle the zero-argument case.

So, although I agree with you, I don't have a strong opinion, and I'm
happy with either.

Regards,Jeff Davis





pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Variadic parameters vs parameter defaults
Next
From: "Ibrar Ahmed"
Date:
Subject: Review: B-Tree emulation for GIN