Re: Anti join confusion - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Anti join confusion
Date
Msg-id 1241615.1740367585@sss.pgh.pa.us
Whole thread Raw
In response to Anti join confusion  (wenhui qiu <qiuwenhuifx@gmail.com>)
Responses Re: Anti join confusion
List pgsql-hackers
wenhui qiu <qiuwenhuifx@gmail.com> writes:
>    I found this path https://commitfest.postgresql.org/patch/3235/ already
> supports anti join , But I've found that in many cases it doesn't work.It
> always uses SubPlan Here's my testing process.

NOT IN is not convertible to an anti-join: the semantics are wrong
because of the way it treats nulls in the sub-select's output.

In principle you could do it if you could prove that the sub-select's
output is never null, but we need to do this transformation long
before we have enough information to make such a deduction.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tender Wang
Date:
Subject: Re: Anti join confusion
Next
From: Jacob Brazeal
Date:
Subject: Experimental tool to explore commitfest patches