Re: Assert failure of the cross-check for nullingrels
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Guo <guofenglinux@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2023-05-19T19:29:16Z
Lists: pgsql-hackers
Richard Guo <guofenglinux@gmail.com> writes: > I keep thinking about my proposal in v2 patch. It seems more natural to > me to fix this issue, because an outer join's quals are always treated > as a whole when we check if identity 3 applies in make_outerjoininfo, as > well as when we adjust the outer join's quals for commutation in > deconstruct_distribute_oj_quals. No, I doubt that that patch works properly. If the join condition contains independent quals on different relations, say select ... from t1 left join t2 on (t1.a = 1 and t2.b = 2) then it may be that those quals need to be pushed to different levels. I don't believe that considering the union of the rels mentioned in any qual is a reasonable thing to do here. regards, tom lane
Commits
-
In clause_is_computable_at(), test required_relids for clone clauses.
- b9c755a2f625 16.0 landed
-
Tweak API of new function clause_is_computable_at().
- 8a2523ff3540 16.0 landed