From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: MindTerm <mindterm@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: How to create function with unspecified number of input parameters
Date: Sun, 25 Nov 2001 00:29:05 -0500 (EST)
Message-ID: <200111250529.fAP5T6G00259@candle.pha.pa.us> (raw)
In-Reply-To: <2762.1006663778@sss.pgh.pa.us>
> 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, Pennsylvania 19026
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: pgman@candle.pha.pa.us, tgl@sss.pgh.pa.us, mindterm@yahoo.com
Subject: Re: How to create function with unspecified number of input parameters
In-Reply-To: <200111250529.fAP5T6G00259@candle.pha.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox