Re: How to create function with unspecified number of input parameters ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: MindTerm <mindterm(at)yahoo(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: How to create function with unspecified number of input parameters ?
Date: 2001-11-25 04:49:38
Message-ID: 2762.1006663778@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

MindTerm <mindterm(at)yahoo(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Bruce Momjian 2001-11-25 05:29:05 Re: How to create function with unspecified number of input parameters
Previous Message MindTerm 2001-11-25 04:25:21 How to create function with unspecified number of input parameters ?