Re: Schema name of function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Schema name of function
Дата
Msg-id 28896.1108397513@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Schema name of function  (Michael Fuhr <mike@fuhr.org>)
Ответы Re: Schema name of function  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-hackers
Michael Fuhr <mike@fuhr.org> 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 contain the function's oid.  If nobody
> mentions an easier way, you could use SPI to query pg_proc and
> pg_namespace.

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.
        regards, tom lane


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

Предыдущее
От: pgsql@mohawksoft.com
Дата:
Сообщение: Re: Query optimizer 8.0.1 (and 8.0)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] WARNING: could not remove database directory