Richard Guo <[email protected]> writes:
> Fuzzing with Claude, I ran into an assertion failure that comes from
> commit 2ebf25e7d:
> create table t1 (a int, b int, c int);
> create table t2 (a int primary key, b int, c int);
> select j.x from (t1 s(x) left join t2 on s.x = t2.a) j;
> server closed the connection unexpectedly
Ugh.
> I think this varnosyn is fine to keep. The join is only removed from
> the jointree; its RTE stays in the rangetable through to the final
> plan, so varnosyn still names a valid RTE. And join removal didn't
> touch varnosyn before 2ebf25e7d either.
True.
> Attached is a fix.
The main consumer of varnosyn is ruleutils.c, so I don't like
the fact that this test case isn't showing what ruleutils will
do with the Var. If we make it be "explain verbose", do we
get a display of the problematic Var?
regards, tom lane