BUG #16913: GENERATED AS IDENTITY column nullability is affected by order of column properties
The Post Office <noreply@postgresql.org>
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: pavel.boev@invitae.com
Date: 2021-03-04T04:13:59Z
Lists: pgsql-bugs
The following bug has been logged on the website: Bug reference: 16913 Logged by: Pavel Boev Email address: pavel.boev@invitae.com PostgreSQL version: 13.2 Operating system: Debian 8.3.0-6 Description: I noticed that nullability of columns having GENERATED AS IDENTITY option is affected by the order of NULL option, so the next query will create a "my_table" table having non-nullable column "generated": create table my_table ( generated integer null generated by default as identity, data text not null ); Whereas the following query will create a "my_table" table having nullable column "generated": create table my_table ( generated integer generated by default as identity null, data text not null ); I noticed the issue appeared in postgres 13.2, however folks say that they bug affects versions 10, 11 and 12 as well.
Commits
-
Doc: correct erroneous entry in this week's minor release notes.
- e5f982156952 10.18 landed
- 6a4c07156802 13.4 landed
- 0a536004b7d9 12.8 landed
- 037cc13f413d 11.13 landed
-
Forbid marking an identity column as nullable.
- f52c5d6749a6 14.0 landed
- e7f7950f6741 12.7 landed
- e5794cd59394 10.17 landed
- 8a2297776667 13.3 landed
- 6c34f186c4c6 11.12 landed