Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fAP4nem63716 for ; Sat, 24 Nov 2001 23:49:40 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id fAP4ndc02765; Sat, 24 Nov 2001 23:49:39 -0500 (EST) To: MindTerm cc: pgsql-sql@postgresql.org Subject: Re: How to create function with unspecified number of input parameters ? In-reply-to: <20011125042521.54480.qmail@web20202.mail.yahoo.com> References: <20011125042521.54480.qmail@web20202.mail.yahoo.com> Comments: In-reply-to MindTerm message dated "Sat, 24 Nov 2001 20:25:21 -0800" Date: Sat, 24 Nov 2001 23:49:38 -0500 Message-ID: <2762.1006663778@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200111/353 X-Sequence-Number: 5735 MindTerm 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