Re: Check each of base restriction clauses for constant-FALSE-or-NULL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Check each of base restriction clauses for constant-FALSE-or-NULL
Date: 2023-10-10 17:56:16
Message-ID: 427989.1696960576@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 Tue, Oct 10, 2023 at 5:10 PM David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
>> After making the change, I saw the same regression test change as you
>> did, but didn't really feel like it was worth tackling separately from
>> the patch that we were working on.

> I was thinking that this change may be worthwhile by itself even without
> the 'reduce-NullTest' patch, because it can benefit some cases, such as
> where EC generates constant-FALSE on the fly. So maybe it's worth a
> separate patch? I'm not quite sure.

I think it's worth pushing separately, since it has a positive impact
on existing cases, as shown by the regression test plan change.
Also, if you compare that test case to the one immediately following
it, it's downright weird that we are presently smarter about
optimizing the more complicated case. (I've not dug into exactly
why that is; maybe worth running it to ground?)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-10-10 18:24:08 Re: Check each of base restriction clauses for constant-FALSE-or-NULL
Previous Message Stefan Stefanov 2023-10-10 17:21:30 Suggestion. Optional local ORDER BY clause for DISTINCT ON