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

From Tom Lane
Subject Re: How to create function with unspecified number of input parameters ?
Date
Msg-id 2762.1006663778@sss.pgh.pa.us
Whole thread Raw
In response to How to create function with unspecified number of input parameters ?  (MindTerm <mindterm@yahoo.com>)
Responses Re: How to create function with unspecified number of input parameters  (Bruce Momjian <pgman@candle.pha.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.
        regards, tom lane


pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Automaticly delete related data
Next
From: Bruce Momjian
Date:
Subject: Re: How to create function with unspecified number of input parameters