Re: Pull up sublink of type 'NOT NOT (expr)'

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Guo <riguo(at)pivotal(dot)io>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Pull up sublink of type 'NOT NOT (expr)'
Date: 2018-11-13 02:05:59
Message-ID: 16174.1542074759@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Richard Guo <riguo(at)pivotal(dot)io> writes:
> Currently for quals in the form of "NOT NOT (SubLink)", this SubLink would
> not be considered when pulling up sublinks.

Yup.

> Should we give it a chance, like the attached does?

What is the argument that this occurs often enough to be worth expending
extra cycles and code space on?

If we do do something like this, I'd be inclined to make it handle
any-number-of-consecutive-NOTs, and maybe remove NOT NOT over an ANY,
not just EXISTS. But I don't honestly think that it's worth troubling
over. Do even the dumbest ORMs generate such code?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-11-13 02:34:55 Re: move PartitionBoundInfo creation code
Previous Message Yotsunaga, Naoki 2018-11-13 02:04:13 RE: [Proposal] Add accumulated statistics for wait event