Re: Schema name of function - Mailing list pgsql-hackers

From Michael Fuhr
Subject Re: Schema name of function
Date
Msg-id 20050214092012.GA4283@winnie.fuhr.org
Whole thread Raw
In response to Schema name of function  ("John Hansen" <john@geeknet.com.au>)
Responses Re: Schema name of function  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Feb 14, 2005 at 07:32:15PM +1100, John Hansen wrote:
> 
> Is there a way for a C function to determine the name of the
> schema in which is was created?

Dunno if there's anything as simple as whats_my_schema(), but
fcinfo->flinfo->fn_oid should contain the function's oid.  If nobody
mentions an easier way, you could use SPI to query pg_proc and
pg_namespace.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/


pgsql-hackers by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Dealing with network-dead clients
Next
From: Oliver Jowett
Date:
Subject: Re: Dealing with network-dead clients