Re: Variable number or arguments to a function possible?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chris Ruprecht <chris(at)ruprecht(dot)org>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Variable number or arguments to a function possible?
Date: 2009-04-25 03:09:38
Message-ID: 25088.1240628978@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Chris Ruprecht <chris(at)ruprecht(dot)org> writes:
> Is it possible to create a function that can take a variable number of
> arguments?

No, but you can make it take an array and then write something like

myfunc(array[x, y, ...])

8.4 will have some syntactic sugar that looks like variable numbers of
arguments, but it's reducing to the above underneath.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Leif B. Kristensen 2009-04-25 11:06:44 Multiple return values and assignment
Previous Message Milen A. Radev 2009-04-25 03:08:25 Re: Variable number or arguments to a function possible?