pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Forbid marking an identity column as nullable.
5+ messages / 1 participants
[nested] [flat]

* pgsql: Forbid marking an identity column as nullable.
@ 2021-03-12 16:08 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2021-03-12 16:08 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Forbid marking an identity column as nullable.

GENERATED ALWAYS AS IDENTITY implies NOT NULL, but the code failed
to complain if you overrode that with "GENERATED ALWAYS AS IDENTITY
NULL".  One might think the old behavior was a feature, but it was
inconsistent because the outcome varied depending on the order of
the clauses, so it seems to have been just an oversight.

Per bug #16913 from Pavel Boev.  Back-patch to v10 where identity
columns were introduced.

Vik Fearing (minor tweaks by me)

Discussion: https://postgr.es/m/16913-3b5198410f67d8c6@postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f52c5d6749a61fc4e0908457c58f5069910d53a6

Modified Files
--------------
doc/src/sgml/ref/create_table.sgml     |  1 +
src/backend/parser/parse_utilcmd.c     | 10 ++++++++++
src/test/regress/expected/identity.out | 13 +++++++++++++
src/test/regress/sql/identity.sql      |  9 +++++++++
4 files changed, 33 insertions(+)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Forbid marking an identity column as nullable.
@ 2021-03-12 16:08 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2021-03-12 16:08 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Forbid marking an identity column as nullable.

GENERATED ALWAYS AS IDENTITY implies NOT NULL, but the code failed
to complain if you overrode that with "GENERATED ALWAYS AS IDENTITY
NULL".  One might think the old behavior was a feature, but it was
inconsistent because the outcome varied depending on the order of
the clauses, so it seems to have been just an oversight.

Per bug #16913 from Pavel Boev.  Back-patch to v10 where identity
columns were introduced.

Vik Fearing (minor tweaks by me)

Discussion: https://postgr.es/m/16913-3b5198410f67d8c6@postgresql.org

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8a2297776667483643823e32fc037a675447d0bb

Modified Files
--------------
doc/src/sgml/ref/create_table.sgml     |  1 +
src/backend/parser/parse_utilcmd.c     | 10 ++++++++++
src/test/regress/expected/identity.out | 13 +++++++++++++
src/test/regress/sql/identity.sql      |  9 +++++++++
4 files changed, 33 insertions(+)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Forbid marking an identity column as nullable.
@ 2021-03-12 16:08 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2021-03-12 16:08 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Forbid marking an identity column as nullable.

GENERATED ALWAYS AS IDENTITY implies NOT NULL, but the code failed
to complain if you overrode that with "GENERATED ALWAYS AS IDENTITY
NULL".  One might think the old behavior was a feature, but it was
inconsistent because the outcome varied depending on the order of
the clauses, so it seems to have been just an oversight.

Per bug #16913 from Pavel Boev.  Back-patch to v10 where identity
columns were introduced.

Vik Fearing (minor tweaks by me)

Discussion: https://postgr.es/m/16913-3b5198410f67d8c6@postgresql.org

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e7f7950f6741a799bdf1dc3d2dbcb85e1b0a3c8c

Modified Files
--------------
doc/src/sgml/ref/create_table.sgml     |  1 +
src/backend/parser/parse_utilcmd.c     | 10 ++++++++++
src/test/regress/expected/identity.out | 13 +++++++++++++
src/test/regress/sql/identity.sql      |  9 +++++++++
4 files changed, 33 insertions(+)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Forbid marking an identity column as nullable.
@ 2021-03-12 16:08 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2021-03-12 16:08 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Forbid marking an identity column as nullable.

GENERATED ALWAYS AS IDENTITY implies NOT NULL, but the code failed
to complain if you overrode that with "GENERATED ALWAYS AS IDENTITY
NULL".  One might think the old behavior was a feature, but it was
inconsistent because the outcome varied depending on the order of
the clauses, so it seems to have been just an oversight.

Per bug #16913 from Pavel Boev.  Back-patch to v10 where identity
columns were introduced.

Vik Fearing (minor tweaks by me)

Discussion: https://postgr.es/m/16913-3b5198410f67d8c6@postgresql.org

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6c34f186c4c62ac93b8f5f7229b03301b02741c9

Modified Files
--------------
doc/src/sgml/ref/create_table.sgml     |  1 +
src/backend/parser/parse_utilcmd.c     | 10 ++++++++++
src/test/regress/expected/identity.out | 13 +++++++++++++
src/test/regress/sql/identity.sql      |  9 +++++++++
4 files changed, 33 insertions(+)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Forbid marking an identity column as nullable.
@ 2021-03-12 16:08 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2021-03-12 16:08 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Forbid marking an identity column as nullable.

GENERATED ALWAYS AS IDENTITY implies NOT NULL, but the code failed
to complain if you overrode that with "GENERATED ALWAYS AS IDENTITY
NULL".  One might think the old behavior was a feature, but it was
inconsistent because the outcome varied depending on the order of
the clauses, so it seems to have been just an oversight.

Per bug #16913 from Pavel Boev.  Back-patch to v10 where identity
columns were introduced.

Vik Fearing (minor tweaks by me)

Discussion: https://postgr.es/m/16913-3b5198410f67d8c6@postgresql.org

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e5794cd593940e48710693c0cdd97c6d7b91f500

Modified Files
--------------
doc/src/sgml/ref/create_table.sgml     |  1 +
src/backend/parser/parse_utilcmd.c     | 12 +++++++++++-
src/test/regress/expected/identity.out | 13 +++++++++++++
src/test/regress/sql/identity.sql      |  9 +++++++++
4 files changed, 34 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2021-03-12 16:08 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-03-12 16:08 pgsql: Forbid marking an identity column as nullable. Tom Lane <tgl@sss.pgh.pa.us>
2021-03-12 16:08 pgsql: Forbid marking an identity column as nullable. Tom Lane <tgl@sss.pgh.pa.us>
2021-03-12 16:08 pgsql: Forbid marking an identity column as nullable. Tom Lane <tgl@sss.pgh.pa.us>
2021-03-12 16:08 pgsql: Forbid marking an identity column as nullable. Tom Lane <tgl@sss.pgh.pa.us>
2021-03-12 16:08 pgsql: Forbid marking an identity column as nullable. Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox