Re: Oracle Decode Function - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: Oracle Decode Function
Date
Msg-id GNELIHDDFBOCMGBFGEFOIEFMCDAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to Re: Oracle Decode Function  (Marc Lavergne <mlavergne-pub@richlava.com>)
List pgsql-hackers
> If you're asking about whether a custom function can have vararg 
> parameters, the answer appears to depend on the CREATE FUNCTION syntax. 
> I've never used them personally, but the PG_FUNCTION_ARGS and 
> PG_GETARG_xxx(#) macros (/src/includes/fmgr.h) available for compiled 
> functions would appear to support variable length argument lists. The 
> problem is that I couldn't pin down a CREATE FUNCTION that provided the 
> same vararg functionality. Hopefully somebody can answer this 
> conclusively.

contrib/fulltextindex/fti.c uses variable numbers of arguments...

Chris



pgsql-hackers by date:

Previous
From: redmonde@purdue.edu
Date:
Subject: solaris 9?
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: Which casts should be implicit