Re: BUG #15212: Default values in partition tables don't work as expected and allow NOT NULL violation

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #15212: Default values in partition tables don't work as expected and allow NOT NULL violation
Date: 2018-11-08 16:30:18
Message-ID: CA+HiwqELb-OPC27FhWrnz6bVKDGg9vj5moKJu5jey9o1RiKGFQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Fri, Nov 9, 2018 at 1:03 AM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
> On 2018-Nov-07, Amit Langote wrote:
>
> > I think the result in this case should be an error, just as it would in
> > the regular inheritance case.
> >
> > create table parent (a text);
> > create table child (a text collate "en_US") inherits (parent);
> > NOTICE: merging column "a" with inherited definition
> > ERROR: column "a" has a collation conflict
> > DETAIL: "default" versus "en_US"
> >
> > In fact, I see that ATTACH PARTITION rejects a partition if collations
> > don't match.
>
> Hmm, I'm thinking perhaps we shouldn't backpatch this part. It's
> obviously a bug, but we might break somebody's working apps. Therefore
> I think I'd rather leave it out of the current bugfix and commit
> separately.

Okay, that may be fine because nothing wrong is happening by silently
ignoring the partition's specified collation.

Thanks,
Amit

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2018-11-08 16:38:09 Re: BUG #15212: Default values in partition tables don't work as expected and allow NOT NULL violation
Previous Message Kanwei Li 2018-11-08 16:29:35 Re: BUG #15489: Segfault on DELETE

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2018-11-08 16:34:44 Re: ATTACH/DETACH PARTITION CONCURRENTLY
Previous Message Jonah H. Harris 2018-11-08 16:09:19 Re: Disallow setting client_min_messages > ERROR?