Re: Making Vars outer-join aware

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Making Vars outer-join aware
Дата
Msg-id 2070642.1659385590@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Making Vars outer-join aware  (Zhihong Yu <zyu@yugabyte.com>)
Список pgsql-hackers
Zhihong Yu <zyu@yugabyte.com> writes:
> For v3-0003-label-Var-nullability-in-parser.patch :

> +   if (rtindex > 0 && rtindex <= list_length(pstate->p_nullingrels))
> +       relids = (Bitmapset *) list_nth(pstate->p_nullingrels, rtindex - 1);
> +   else
> +       relids = NULL;
> +
> +   /*
> +    * Merge with any already-declared nulling rels.  (Typically there won't
> +    * be any, but let's get it right if there are.)
> +    */
> +   if (relids != NULL)

> It seems the last if block can be merged into the previous if block. That
> way `relids = NULL` can be omitted.

No, because the list entry we fetch could be NULL.

            regards, tom lane



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

Предыдущее
От: Jacob Champion
Дата:
Сообщение: Re: A problem about partitionwise join
Следующее
От: Zhihong Yu
Дата:
Сообщение: Re: Making Vars outer-join aware