Re: BUG #15166: PL/PGSQL default rowtype variable value is null but also not null

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #15166: PL/PGSQL default rowtype variable value is null but also not null
Дата
Msg-id 19263.1524323676@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #15166: PL/PGSQL default rowtype variable value is null but also not null  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Список pgsql-bugs
Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> That could be considered a slight bug in the documentation, because what
> actually happens for rowtype variables is that they are initialized to a
> row value with all null columns, NOT to the null value.

Right, if they're declared as a named composite type rather than RECORD.

> Also, it looks like this behavior changes in pg11, probably not
> intentionally.

For the record, it was entirely intentional, cf

https://postgr.es/m/8962.1514399547@sss.pgh.pa.us

As of commit 4b93f5799, both named-composite and RECORD variables
are initialized to simple NULLs, not ROW(NULL,NULL,...).

            regards, tom lane


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

Предыдущее
От: Alex
Дата:
Сообщение: Re: BUG #15166: PL/PGSQL default rowtype variable value is null butalso not null
Следующее
От: Сергей
Дата:
Сообщение: postgres 10.3 no response