From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jürgen Strobel <juergen+postgresql@strobel.info>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: BUG #15212: Default values in partition tables don't work as expected and allow NOT NULL violation
Date: Mon, 12 Nov 2018 18:57:19 -0500
Message-ID: <10299.1542067039@sss.pgh.pa.us> (raw)
In-Reply-To: <ebcf4a32-cfee-8a8f-525d-6ceaa72c75d8@strobel.info>
References: <20181112140051.yv5m77esq5jz6rkg@alvherre.pgsql>
<5662.1542040384@sss.pgh.pa.us>
<ebcf4a32-cfee-8a8f-525d-6ceaa72c75d8@strobel.info>
=?UTF-8?Q?J=c3=bcrgen_Strobel?= <juergen+postgresql@strobel.info> writes:
> On 2018-11-12 17:33, Tom Lane wrote:
>> I'm not entirely convinced that I buy that argument, especially not in
>> a case like this where it introduces logical inconsistencies where there
>> otherwise wouldn't be any.
> I think I missed something, what are the *introduced* logical problems?
What to do if a partition introduces a default value that would force
re-routing to some other partition.
> Apart from implementation issues the only logical problems I see are if
> you allow to change defaults of the partition key columns, and these are
> problematic (nonsensical really) in either case.
Just claiming that it's nonsensical doesn't fix the problem. Also, it
is neither problematic nor nonsensical for the root to provide defaults
for partition key columns. So if we go this route, we are giving up
useful behavior (key-column defaults on the root) for useless behavior
(key-column defaults on the partitions).
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, juergen+postgresql@strobel.info, alvherre@2ndquadrant.com, Langote_Amit_f8@lab.ntt.co.jp, pgsql-hackers@lists.postgresql.org
Subject: Re: BUG #15212: Default values in partition tables don't work as expected and allow NOT NULL violation
In-Reply-To: <10299.1542067039@sss.pgh.pa.us>
* 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