From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Amit Langote <amitlangote09@gmail.com>
Cc: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Jürgen Strobel <juergen+postgresql@strobel.info>
Subject: Re: BUG #15212: Default values in partition tables don't work as expected and allow NOT NULL violation
Date: Fri, 9 Nov 2018 14:11:24 +0900
Message-ID: <7d42123a-2d60-2829-8d6b-0c28e3e32376@lab.ntt.co.jp> (raw)
In-Reply-To: <f8d48ff8-9e57-e338-e21d-74dda4eca4dc@lab.ntt.co.jp>
References: <20181108193940.2uam7tz6femqrd64@alvherre.pgsql>
<f8d48ff8-9e57-e338-e21d-74dda4eca4dc@lab.ntt.co.jp>
On 2018/11/09 14:04, Amit Langote wrote:
> On 2018/11/09 4:39, Alvaro Herrera wrote:
>> and if somebody has it, a change to how defaults are applied
>> when routing tuples.
>
> I haven't written such a patch yet. Do we want such a feature?
Or is it a *bug* of tuple-routing that it doesn't substitute default
values that may be defined for partitions? It kind of looks like one if
you see an example like this.
create table p (a int, b int) partition by list (a);
create table p1 partition of p (b not null default 1) for values in (1);
insert into p1 values (1);
table p;
a │ b
───┼───
1 │ 1
(1 row)
insert into p values (1);
ERROR: null value in column "b" violates not-null constraint
DETAIL: Failing row contains (1, null).
Thanks,
Amit
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-bugs@postgresql.org
Cc: Langote_Amit_f8@lab.ntt.co.jp, alvherre@2ndquadrant.com, amitlangote09@gmail.com, ashutosh.bapat@enterprisedb.com, pgsql-hackers@lists.postgresql.org, juergen+postgresql@strobel.info
Subject: Re: BUG #15212: Default values in partition tables don't work as expected and allow NOT NULL violation
In-Reply-To: <7d42123a-2d60-2829-8d6b-0c28e3e32376@lab.ntt.co.jp>
References: <20181108193940.2uam7tz6femqrd64@alvherre.pgsql> <f8d48ff8-9e57-e338-e21d-74dda4eca4dc@lab.ntt.co.jp> <7d42123a-2d60-2829-8d6b-0c28e3e32376@lab.ntt.co.jp>
* 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