pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Don't explicitly mark range partitioning columns NOT NULL.
Date: Thu, 18 May 2017 18:05:59 +0000
Message-ID: <E1dBPoF-0004to-D5@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3ec76ff1f2cf52e9b900349957b42d28128b7bc7

Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out |  4 +-
doc/src/sgml/ref/create_table.sgml             |  5 --
src/backend/catalog/partition.c                | 71 ++++++++++++++++----------
src/backend/commands/tablecmds.c               | 57 +--------------------
src/test/regress/expected/alter_table.out      |  7 ---
src/test/regress/expected/create_table.out     | 40 +++++----------
src/test/regress/expected/insert.out           |  5 +-
src/test/regress/sql/alter_table.sql           |  8 ---
src/test/regress/sql/create_table.sql          |  5 --
9 files changed, 64 insertions(+), 138 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1dBPoF-0004to-D5@gemulon.postgresql.org>
Permalink:  ../E1dBPoF-0004to-D5@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1dBPoF-0004to-D5@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: rhaas@postgresql.org
  Subject: Re: pgsql: Don't explicitly mark range partitioning columns NOT NULL.
  In-Reply-To: <E1dBPoF-0004to-D5@gemulon.postgresql.org>
  References: <E1dBPoF-0004to-D5@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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