Re: Check each of base restriction clauses for constant-FALSE-or-NULL - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Check each of base restriction clauses for constant-FALSE-or-NULL
Date
Msg-id 427989.1696960576@sss.pgh.pa.us
Whole thread Raw
In response to Re: Check each of base restriction clauses for constant-FALSE-or-NULL  (Richard Guo <guofenglinux@gmail.com>)
Responses Re: Check each of base restriction clauses for constant-FALSE-or-NULL
List pgsql-hackers
Richard Guo <guofenglinux@gmail.com> writes:
> On Tue, Oct 10, 2023 at 5:10 PM David Rowley <dgrowleyml@gmail.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



pgsql-hackers by date:

Previous
From: Stefan Stefanov
Date:
Subject: Suggestion. Optional local ORDER BY clause for DISTINCT ON
Next
From: Tom Lane
Date:
Subject: Re: Check each of base restriction clauses for constant-FALSE-or-NULL