1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-11 20:28:21 +03:00

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
This commit is contained in:
Robert Haas
2017-05-18 13:48:10 -04:00
parent 2df537e43f
commit 3ec76ff1f2
9 changed files with 64 additions and 138 deletions

View File

@ -6987,7 +6987,7 @@ FDW Options: (schema_name 'import_source', table_name 't3')
Foreign table "import_dest1.t4"
Column | Type | Collation | Nullable | Default | FDW Options
--------+---------+-----------+----------+---------+--------------------
c1 | integer | | not null | | (column_name 'c1')
c1 | integer | | | | (column_name 'c1')
Server: loopback
FDW Options: (schema_name 'import_source', table_name 't4')
@ -7051,7 +7051,7 @@ FDW Options: (schema_name 'import_source', table_name 't3')
Foreign table "import_dest2.t4"
Column | Type | Collation | Nullable | Default | FDW Options
--------+---------+-----------+----------+---------+--------------------
c1 | integer | | not null | | (column_name 'c1')
c1 | integer | | | | (column_name 'c1')
Server: loopback
FDW Options: (schema_name 'import_source', table_name 't4')