Re: Missing update of all_hasnulls in BRIN opclasses

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема Re: Missing update of all_hasnulls in BRIN opclasses
Дата
Msg-id 20230107003754.GB7216@telsasoft.com
обсуждение исходный текст
Ответ на Re: Missing update of all_hasnulls in BRIN opclasses  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Ответы Re: Missing update of all_hasnulls in BRIN opclasses  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Список pgsql-hackers
On Fri, Dec 30, 2022 at 01:18:36AM +0100, Tomas Vondra wrote:
> +         * Does the range already has NULL values? Either of the flags can

should say: "already have NULL values"

> +         * If we had NULLS, and the opclass didn't set allnulls=true, set
> +         * the hasnulls so that we know there are NULL values.

You could remove "the" before "hasnulls".
Or say "clear hasnulls so that.."

> @@ -585,6 +587,13 @@ brin_deform_tuple(BrinDesc *brdesc, BrinTuple *tuple, BrinMemTuple *dMemtuple)
>      {
>          int            i;
>  
> +        /*
> +         * Make sure to overwrite the hasnulls flag, because it was initialized
> +         * to true by brin_memtuple_initialize and we don't want to skip it if
> +         * allnulls.

Does "if allnulls" mean "if allnulls is true" ?
It's a bit unclear.

> +         */
> +        dtup->bt_columns[keyno].bv_hasnulls = hasnulls[keyno];
> +
>          if (allnulls[keyno])
>          {
>              valueno += brdesc->bd_info[keyno]->oi_nstored;

-- 
Justin



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

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: add \dpS to psql
Следующее
От: Andrey Borodin
Дата:
Сообщение: Re: GROUP BY ALL