Re: OID of current function

From: Thomas Hallgren <thhal(at)mailblocks(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: OID of current function
Date: 2005-01-12 15:08:28
Message-ID: 41E53D6C.6060905@mailblocks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-01-12 15:14:51 Re: Bug in pg_dump in 7.4.6?
Previous Message Marco Colombo 2005-01-12 09:51:06 Re: Bug in pg_dump in 7.4.6?