Re: Way to check for function existance

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Way to check for function existance
Дата
Msg-id 790.1101248530@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Way to check for function existance  ("Jim C. Nasby" <decibel@decibel.org>)
Список pgsql-general
"Jim C. Nasby" <decibel@decibel.org> writes:
> I'm also working on trying to do a select out of pg_proc, but I'm not
> having a lot of luck there either...

> # select oid,* from pg_proc where proname='user_write_lock_oid' and
>  proargtypes = ARRAY((SELECT oid FROM pg_type WHERE
>  typname='oid'))::oidvector;
> ERROR:  cannot cast type oid[] to oidvector

For standard types like OID, it's probably easiest just to hardwire the
oidvector value:
select ...
where proname='user_write_lock_oid' and pronargs = 1 and proargtypes = '26';
Note you should include the pronargs test to allow this to match the
index on pg_proc.

            regards, tom lane

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

Предыдущее
От: jseymour@linxnet.com (Jim Seymour)
Дата:
Сообщение: Re: Upcoming Changes to News Server ...
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Upcoming Changes to News Server ...