Re: Parallel safety tagging of extension functions

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Parallel safety tagging of extension functions
Дата
Msg-id CAB7nPqTxg-GG5Uzjsdex2F1R38xwtP9m6zidEG44Vrni2tD_Rw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Parallel safety tagging of extension functions  (Andreas Karlsson <andreas@proxel.se>)
Ответы Re: Parallel safety tagging of extension functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sat, May 21, 2016 at 6:16 PM, Andreas Karlsson <andreas@proxel.se> wrote:
> My immediate thought is first doing an UPDATE of pg_proc and then updating
> the catcache with CREATE OR REPLACE with the new arguments. Does that work?
> Is there a less ugly way to accomplish this?
>
> Example:
>
> UPDATE pg_proc SET proargtypes = ('internal'::regtype::oid || ' ' ||
> 'internal'::regtype::oid)::oidvector
> WHERE proname = 'gbt_oid_union'
> AND proargtypes = ('bytea'::regtype::oid || ' ' ||
> 'internal'::regtype::oid)::oidvector
> AND pronamespace = current_schema()::regnamespace;
>
> CREATE OR REPLACE FUNCTION gbt_oid_union(internal, internal)
> RETURNS gbtreekey8
> AS 'MODULE_PATHNAME'
> LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;

Isn't it better to just drop and recreate the function? pageinspect
did so for example for heap_page_items in 1.4 to update its OUT
arguments.
-- 
Michael



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

Предыдущее
От: Andreas Karlsson
Дата:
Сообщение: Re: Parallel safety tagging of extension functions
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: statistics for shared catalogs not updated when autovacuum is off