Re: pgsql: Fix incorrect matching of subexpressions in outer-join plan node

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Fix incorrect matching of subexpressions in outer-join plan node
Дата
Msg-id 22812.1428362539@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgsql: Fix incorrect matching of subexpressions in outer-join plan node  (Qingqing Zhou <zhouqq.postgres@gmail.com>)
Ответы Re: pgsql: Fix incorrect matching of subexpressions in outer-join plan node  (Qingqing Zhou <zhouqq.postgres@gmail.com>)
Список pgsql-committers
Qingqing Zhou <zhouqq.postgres@gmail.com> writes:
> On Sat, Apr 4, 2015 at 4:55 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> (This is somewhat overkill, in that a strict expression could still be
>> matched, but it doesn't seem worth the effort to check that.)

> Just curious, checking an expression strictness is convenient in
> build_tlist_index() like this:

>    TargetEntry *tle = (TargetEntry *) lfirst(l);

> +  if (contain_nonstrict_functions((Node *)tle))
> +            *hasnonstrict = true;
> +

> And this will almost avoid the overkill at once. Why not do this?

Because it's expensive (a syscache lookup per function or operator).
And that test alone would be insufficient anyway: you'd also have to
check that there was an appropriate Var in the expression, cf the
comment for contain_nonstrict_functions.

            regards, tom lane


В списке pgsql-committers по дате отправления:

Предыдущее
От: Qingqing Zhou
Дата:
Сообщение: Re: pgsql: Fix incorrect matching of subexpressions in outer-join plan node
Следующее
От: Qingqing Zhou
Дата:
Сообщение: Re: pgsql: Fix incorrect matching of subexpressions in outer-join plan node