Re: constraint exclusion and nulls in IN (..) clause

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: emre(at)hasegeli(dot)com
Cc: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: constraint exclusion and nulls in IN (..) clause
Date: 2018-03-21 14:00:41
Message-ID: 12286.1521640841@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Emre Hasegeli <emre(at)hasegeli(dot)com> writes:
> I am not sure if we are covering the case when clause_const and
> pred_const are both NULL. In this case, we should be able to return
> true only by checking op_strict(pred_op) or maybe even without
> checking that. Am I mistaken?

Yeah, that's there. We need both operators to be strict, I think;
otherwise we can't really assume anything about what they'd return
for NULL inputs. But if they are, we have NULL => NULL which is
valid for all proof cases.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2018-03-21 14:14:58 Re: Re: Re: reorganizing partitioning code
Previous Message Peter Eisentraut 2018-03-21 13:28:24 Re: PQHost() undefined behavior if connecting string contains both host and hostaddr types