IDENTITY columns are NOT NULL automatically

Поиск
Список
Период
Сортировка
От Erwin Brandstetter
Тема IDENTITY columns are NOT NULL automatically
Дата
Msg-id CAGHENJ6db0U+7LjhWWov96aFW0exkOBRi2roKb06n2UsWM9VhQ@mail.gmail.com
обсуждение исходный текст
Список pgsql-docs
An IDENTITY column is automatically NOT NULL - which is per SQL standard. I think this should be documented in sql-createtable.html. The same is currently documented for PRIMARY KEY constraints:


> PRIMARY KEY enforces the same data constraints as a combination of UNIQUE and NOT NULL

I suggest to replace this paragraph:

<< This clause creates the column as an identity column. It will have an implicit sequence attached to it and the column in new rows will automatically have values from the sequence assigned to it.

With this:

>> This clause creates the column as an identity column - with an implicit sequence attached to it that automatically supplies column values for new rows. A NOT NULL constraint is applied automatically.

Regards
Erwin

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

Предыдущее
От: "Jonathan S. Katz"
Дата:
Сообщение: Re: Release note trimming: another modest proposal
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Release note trimming: another modest proposal