Re: variadic function support

Andrew Dunstan <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.patches
Message-ID <[email protected]>

Tom Lane wrote:
> Your point about the syntax is good though.  It would be better if
> the syntax were like
>
> 	create function foo (a text, variadic b int[])
>
> or maybe even better
>
> 	create function foo (a text, variadic b int)
>
> since (a) this makes it much more obvious to the reader what the
> function might match, and (b) it leaves the door open for marking
> multiple parameters as variadic, if we can figure out what that means.
>
> 			
>   

Yes. I understand from the family Java expert that (surface syntax 
issues aside) the second is similar to the way Java does this, in fact, 
so there's some precedent. That would mean that your first would 
actually mean each variadic arg has to be an array of ints, which we 
might well want to provide for.

So with that modification I'll be lots happier with the feature.

cheers

andrew

-- 
Sent via pgsql-patches mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.