Re: Assert failure of the cross-check for nullingrels

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Assert failure of the cross-check for nullingrels
Date: 2023-05-19 19:29:16
Message-ID: 354925.1684524556@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Richard Guo <guofenglinux(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitry Markman 2023-05-19 19:32:05 Re: How to ensure that SSPI support (Windows) enabled?
Previous Message Daniel Verite 2023-05-19 19:13:47 Re: Order changes in PG16 since ICU introduction