| From: | Joe Conway <mail(at)joeconway(dot)com> |
|---|---|
| To: | Nabil Sayegh <postgresql(at)e-trolley(dot)de> |
| Cc: | pgsql-novice <pgsql-novice(at)postgresql(dot)org> |
| Subject: | Re: PG_FUNCTION_ARGS: typeof arg ? |
| Date: | 2003-06-24 20:23:42 |
| Message-ID: | 3EF8B34E.8090608@joeconway.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
Nabil Sayegh wrote:
> is there a possibility to check the type of the nth argument of
> PG_FUNCTION_ARGS ?
>
> I'm trying to add another (optional) argument to a function that already
> has an optional one.
> So I need to know if the 4th arg is of type TEXT (or not of INT32).
There isn't a way to do it in 7.3, but you will be able to in 7.4 (and
can on 7.4devel/cvs HEAD):
/*
* Get the type OID of a specific function argument (counting from 0)
*
* Returns InvalidOid if information is not available
*/
Oid get_fn_expr_argtype(FunctionCallInfo fcinfo, int argnum)
Joe
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nabil Sayegh | 2003-06-25 00:56:41 | connectby() minor bug in errormessage |
| Previous Message | Nabil Sayegh | 2003-06-24 17:57:23 | PG_FUNCTION_ARGS: typeof arg ? |