Re: [HACKERS] Schema name of function

2005-02-14 Thread John Hansen
Beautiful, just what I was looking for. Thnx, John > -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 15, 2005 6:31 AM > To: Michael Fuhr > Cc: John Hansen; pgsql-hackers@postgresql.org > Subject: Re: [HACKERS] Schem

Re: [HACKERS] Schema name of function

2005-02-14 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > On Mon, Feb 14, 2005 at 11:11:53AM -0500, Tom Lane wrote: >> In C, it'd be a lot easier (and faster) to do a couple of SearchSysCache >> calls than to use SPI to get those rows. > The following appears to work -- does it look right, aside from the > missi

Re: [HACKERS] Schema name of function

2005-02-14 Thread Michael Fuhr
On Mon, Feb 14, 2005 at 11:11:53AM -0500, Tom Lane wrote: > > In C, it'd be a lot easier (and faster) to do a couple of SearchSysCache > calls than to use SPI to get those rows. The following appears to work -- does it look right, aside from the missing error checking? tuple = SearchSysCache(P

Re: [HACKERS] Schema name of function

2005-02-14 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > 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

Re: [HACKERS] Schema name of function

2005-02-14 Thread Michael Fuhr
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 mentio

[HACKERS] Schema name of function

2005-02-14 Thread John Hansen
Just got reminded... Is there a way for a C function to determine the name of the schema in which is was created? ... John ---(end of broadcast)--- TIP 8: explain analyze is your friend