Re: OID of current function - Mailing list pgsql-general

From Thomas Hallgren
Subject Re: OID of current function
Date
Msg-id 41E53D6C.6060905@mailblocks.com
Whole thread Raw
In response to OID of current function  ("Jim C. Nasby" <decibel@decibel.org>)
Responses Re: OID of current function  ("Jim C. Nasby" <decibel@decibel.org>)
List pgsql-general
Jim C. Nasby wrote:
> Is there an easy way to get the OID of the currently running function?
> (IE: the function you're in when you execute the code to see what
> function you're in, if that makes any sense).

In what language? In C you can use:

Datum your_function(PG_FUNCTION_ARGS)
{
    Oid funcOid = fcinfo->flinfo->fn_oid;
    ...
}

Regards,
Thomas Hallgren

pgsql-general by date:

Previous
From: Marco Colombo
Date:
Subject: Re: Bug in pg_dump in 7.4.6?
Next
From: Tom Lane
Date:
Subject: Re: Bug in pg_dump in 7.4.6?