Re: BUG #16913: GENERATED AS IDENTITY column nullability is affected by order of column properties

Поиск
Список
Период
Сортировка
От Shay Rojansky
Тема Re: BUG #16913: GENERATED AS IDENTITY column nullability is affected by order of column properties
Дата
Msg-id CADT4RqAwD3A=RvGiQU9AiTK-6VeuXcycwPHmJPv_OBCJFYOEww@mail.gmail.com
обсуждение исходный текст
Ответы Re: BUG #16913: GENERATED AS IDENTITY column nullability is affected by order of column properties  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Hi all.

I can see the PG 13.3 change note about GENERATED ALWAYS AS IDENTITY no longer being compatible with an explicit NULL specification. However, it seems that GENERATED BY DEFAULT AS IDENTITY also is no longer compatible with null:

CREATE TABLE foo
(
    id INTEGER NULL GENERATED BY DEFAULT AS IDENTITY
);

Results in:

ERROR:  conflicting NULL/NOT NULL declarations for column "id" of table "foo"

Is this intended? It seems to make sense to allow NULL to be explicitly inserted into columns whith as GENERATED BY DEFAULT AS IDENTITY. If this is intended, maybe the release notes should be updated for this.

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: BUG #16833: postgresql 13.1 process crash every hour
Следующее
От: Alex F
Дата:
Сообщение: Re: BUG #16833: postgresql 13.1 process crash every hour