Re: [BUGS] BUG #14706: Dependencies not recorded properly for base types
От | Michael Paquier |
---|---|
Тема | Re: [BUGS] BUG #14706: Dependencies not recorded properly for base types |
Дата | |
Msg-id | CAB7nPqTyfyxiG2if30eMPRTx9=dTtBPKrLh2g6tNpa1B4=9LPA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [BUGS] BUG #14706: Dependencies not recorded properly for base types (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [BUGS] BUG #14706: Dependencies not recorded properly for base types
|
Список | pgsql-bugs |
On Thu, Jun 15, 2017 at 9:42 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > khuddleston@pivotal.io writes: >> CREATE FUNCTION base_fn_in(cstring) returns opaque as 'boolin' language >> internal; >> CREATE FUNCTION base_fn_out(opaque) returns opaque as 'boolout' language >> internal; >> CREATE TYPE base_type(input=base_fn_in, output=base_fn_out); > > You realize of course that this is long-deprecated style. > >> DROP TYPE base_type; >> \df >> ERROR: cache lookup failed for type 22241 (format_type.c:137) > > ... but yeah, as long as we're supporting it at all, that shouldn't > happen. Thanks for the report! The return type of the input function and argument type of the output function get updated when the type is created via SetFunctionReturnType(). This code is actually missing the fact that at the same time to add dependencies in pg_depend which should add a link between the function as objid to the type as refobjid. The reversed dependency is tracked though. Tom, are you working on a patch? At quick glance, this is just missing a call to recordDependencyOn() in SetFunctionReturnType(). -- Michael -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
В списке pgsql-bugs по дате отправления: