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

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: constraint exclusion and nulls in IN (..) clause
Дата
Msg-id
29813.1521725676@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
constraint exclusion and nulls in IN (..) clause Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: constraint exclusion and nulls in IN (..) clause Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: constraint exclusion and nulls in IN (..) clause Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: constraint exclusion and nulls in IN (..) clause Emre Hasegeli <emre@hasegeli.com>
Re: constraint exclusion and nulls in IN (..) clause Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: constraint exclusion and nulls in IN (..) clause Emre Hasegeli <emre@hasegeli.com>
Re: constraint exclusion and nulls in IN (..) clause Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: constraint exclusion and nulls in IN (..) clause Tom Lane <tgl@sss.pgh.pa.us>
Re: constraint exclusion and nulls in IN (..) clause Tom Lane <tgl@sss.pgh.pa.us>
Re: constraint exclusion and nulls in IN (..) clause Tom Lane <tgl@sss.pgh.pa.us>
Re: constraint exclusion and nulls in IN (..) clause Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: constraint exclusion and nulls in IN (..) clause Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: constraint exclusion and nulls in IN (..) clause Emre Hasegeli <emre@hasegeli.com>
Re: constraint exclusion and nulls in IN (..) clause Tom Lane <tgl@sss.pgh.pa.us>
Re: constraint exclusion and nulls in IN (..) clause Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: constraint exclusion and nulls in IN (..) clause Tom Lane <tgl@sss.pgh.pa.us>
Re: constraint exclusion and nulls in IN (..) clause Emre Hasegeli <emre@hasegeli.com>
Re: constraint exclusion and nulls in IN (..) clause Emre Hasegeli <emre@hasegeli.com>
Re: constraint exclusion and nulls in IN (..) clause Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: constraint exclusion and nulls in IN (..) clause Emre Hasegeli <emre@hasegeli.com>
Re: constraint exclusion and nulls in IN (..) clause Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: constraint exclusion and nulls in IN (..) clause Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: constraint exclusion and nulls in IN (..) clause Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: constraint exclusion and nulls in IN (..) clause Robert Haas <robertmhaas@gmail.com>
Amit Langote  writes:
> I too wasn't sure if the patch's modifications to
> operator_predicate_proof() led to correct handling for the case where both
> clause_const and pred_const are both NULL consts.  ISTM that the result in
> that case becomes what operator_same_subexprs_proof() would return for the
> pred_op (possibly commuted) and clause_op pair.  But maybe we don't end up
> in that case much.

Probably not.  It's hard to get to this type of case at all, because in
most cases, if we have a null constant as a subexpression, previous
const-simplification would have replaced the whole expression with null.
I think in practice it's only interesting when the upper levels of
predtest.c have constructed an operator expression out of parts of the
given clauses, which is exactly what happens for cases like IN-lists.

			regards, tom lane

В списке pgsql-hackers по дате отправления
От: Ashutosh Bapat
Дата:
От: David Steele
Дата:
Сообщение: Re: Boolean partitions syntax
FAQ