Re: Schema name of function

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Schema name of function
Дата
Msg-id 20050214181255.GA28075@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: Schema name of function  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Schema name of function  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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(PROCOID,                        ObjectIdGetDatum(fcinfo->flinfo->fn_oid),
0, 0, 0); nsoid = SysCacheGetAttr(PROCOID, tuple,                         Anum_pg_proc_pronamespace, &isnull);
schemaname= get_namespace_name(nsoid); ReleaseSysCache(tuple);
 

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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: pgsql@mohawksoft.com
Дата:
Сообщение: Re: Help me recovering data
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: getting oid of function