Re: [HACKERS][BUG] Cache invalidation for queries that contains constof temporary composite type
От | Maksim Milyutin |
---|---|
Тема | Re: [HACKERS][BUG] Cache invalidation for queries that contains constof temporary composite type |
Дата | |
Msg-id | 76c8a750-201a-bc06-9d29-90a5725b0ae7@gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS][BUG] Cache invalidation for queries that containsconst of temporary composite type (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>) |
Список | pgsql-hackers |
Hi HORIGUCHI-san! Thanks for the valuable comments. 03.10.17 4:30, Kyotaro HORIGUCHI wrote: > The first thought that patch gave me is that the problem is not > limited to constants. Actually the following sequence also > reproduces similar failure even with this patch. > > create table t2 (x int , y int); > create type pair as (x int, y int); > prepare test as select row(x, y)::pair from t2; > drop type pair; > execute test; > | ERROR: cache lookup failed for type 16410 > > In this case the causal expression is in the following form. > > TargetEntry ( > expr = ( > RowExpr: > typeid = 16410, > row_format = COERCE_EXPLICIT_CAST, > args = List (Var(t2.x), Var(t2.y)) > ) > ) Yeah, RowExpr has no dependency from type relation with oid=16410. I think the routine 'fix_expr_common' needs to be reworked to take into account any possible dependencies of expression from composite type. On November commitfest I'll lay out patch that covers your case. -- Regards, Maksim Milyutin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
В списке pgsql-hackers по дате отправления: