Re: About the constant-TRUE clause in reconsider_outer_join_clauses

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: About the constant-TRUE clause in reconsider_outer_join_clauses
Date: 2023-03-27 03:15:46
Message-ID: 3076407.1679886946@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:
> On Sat, Mar 25, 2023 at 11:41 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Richard Guo <guofenglinux(at)gmail(dot)com> writes:
>>> Should we instead mark the constant-TRUE clause with required_relids
>>> plus the OJ relid?

>> I do not think it matters.

> Yeah, I agree that it makes no difference currently. One day if we want
> to replace the is_pushed_down flag with checking to see if a clause's
> required_relids includes the OJ being formed in order to tell whether
> it's a filter or join clause, I think we'd need to make this change.

I did think about that ... but a constant-TRUE clause is going to be a
no-op no matter which classification you give it. We do have some work to
do in that area, but I think it's not an issue for this particular case.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2023-03-27 03:31:37 Re: Data is copied twice when specifying both child and parent table in publication
Previous Message Richard Guo 2023-03-27 02:57:59 Re: About the constant-TRUE clause in reconsider_outer_join_clauses