]> granicus.if.org Git - postgresql/commit
Don't explicitly mark range partitioning columns NOT NULL.
authorRobert Haas <rhaas@postgresql.org>
Thu, 18 May 2017 17:48:10 +0000 (13:48 -0400)
committerRobert Haas <rhaas@postgresql.org>
Thu, 18 May 2017 17:49:31 +0000 (13:49 -0400)
commit3ec76ff1f2cf52e9b900349957b42d28128b7bc7
treeb7eef4bb3d490b31ec2d25f7067912d4ea9d20c4
parent2df537e43fdc432cccbe64de166ac97363cbca3c
Don't explicitly mark range partitioning columns NOT NULL.

This seemed like a good idea originally because there's no way to mark
a range partition as accepting NULL, but that now seems more like a
current limitation than something we want to lock down for all time.
For example, there's a proposal to add the notion of a default
partition which accepts all rows not otherwise routed, which directly
conflicts with the idea that a range-partitioned table should never
allow nulls anywhere.  So let's change this while we still can, by
putting the NOT NULL test into the partition constraint instead of
changing the column properties.

Amit Langote and Robert Haas, reviewed by Amit Kapila

Discussion: http://postgr.es/m/8e2dd63d-c6fb-bb74-3c2b-ed6d63629c9d@lab.ntt.co.jp
contrib/postgres_fdw/expected/postgres_fdw.out
doc/src/sgml/ref/create_table.sgml
src/backend/catalog/partition.c
src/backend/commands/tablecmds.c
src/test/regress/expected/alter_table.out
src/test/regress/expected/create_table.out
src/test/regress/expected/insert.out
src/test/regress/sql/alter_table.sql
src/test/regress/sql/create_table.sql