Re: How to create function with unspecified number of input parameters - Mailing list pgsql-sql

From Bruce Momjian
Subject Re: How to create function with unspecified number of input parameters
Date
Msg-id 200111250529.fAP5T6G00259@candle.pha.pa.us
Whole thread Raw
In response to Re: How to create function with unspecified number of input parameters ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: How to create function with unspecified number of input parameters ?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
> MindTerm <mindterm@yahoo.com> writes:
> >   I am writing to ask how to create function ( CREATE
> > FUNCTION ) with unspecified number of input parameters
> 
> CREATE FUNCTION doesn't presently support that.
> 
> If the underlying function is written in C, you can fake it by
> issuing multiple CREATE FUNCTION commands with different numbers
> of declared parameters, all of which point to the same C function.
> Then the C code would have to look at fcinfo->nargs to see how it
> had been called.

Is this a TODO item?

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: How to create function with unspecified number of input parameters ?
Next
From: Tom Lane
Date:
Subject: Re: How to create function with unspecified number of input parameters ?