Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Patches > Re: variadic fu...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 3895 of 4084
Post > Topic >>

Re: variadic function sup****t

by pavel.stehule@[EMAIL PROTECTED] ("Pavel Stehule") Jul 14, 2008 at 09:26 AM

>
> As far as the "variadic int" versus "variadic int[]" business, I'm
> starting to agree with Pavel that "variadic int[]" offers less potential
> for confusion.  In particular, it seems to make it more obvious for the
> function author that the argument he receives is an array.  Also, the
> other one would mean that what we put into pg_proc.proargtypes doesn't
> agree directly with what the user thinks the argument types are.  While
> I think we could force that to work, it's not exactly satisfying the
> principle of least surprise.
>
>
> One issue that just occurred to me: what if a variadic function wants to
> turn around and call another variadic function, passing the same array
> argument on to the second one?  This is closely akin to the problem
> faced by C "..." functions, and the solutions are pretty ugly (sprintf
> vs vsprintf for instance).  Can we do any better?  At least in the
> polymorphic case, I'm not sure we can :-(.
>
>                        regards, tom lane
>

maybe with some flag like PARAMS?

SELECT least(PARAMS ARRAY[1,2,3,4,5,6])

Regards
Pavel Stehule

-- 
Sent via pgsql-patches mailing list (pgsql-patches@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches
 




 2 Posts in Topic:
Re: variadic function support
pavel.stehule@[EMAIL PROT  2008-07-14 09:26:41 
Re: variadic function support
fgp@[EMAIL PROTECTED] (&  2008-07-14 15:30:00 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 6:33:36 CDT 2008.