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 ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers