Re: [HACKERS] NOT NULL constraints on range partition key columns - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] NOT NULL constraints on range partition key columns
Date
Msg-id CA+TgmoayJEAKXM+_dSHH07s-+_CL4NWdrgeyVq9AejrzTYaO+A@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] NOT NULL constraints on range partition key columns  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: [HACKERS] NOT NULL constraints on range partition key columns  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
List pgsql-hackers
On Mon, May 15, 2017 at 9:12 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
> Can't we allow NULL to get inserted into the partition (leaf
> partition) if the user uses the partition name in Insert statement?

That would be terrible behavior - the behavior of tuple routing should
match the enforced constraints.

> For root partitions, I think for now giving an error is okay, but once
> we have default partitions (Rahila's patch), we can route NULLS to
> default partition.

Yeah, that's exactly why I think we should make the change Amit is
proposing here.  If we don't, then we won't be able to accept NULL
values even after we have the default partitioning stuff.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] Hash Functions
Next
From: Mark Dilger
Date:
Subject: Re: [HACKERS] Hash Functions