From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
Cc: | gomer94(at)yandex(dot)ru, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com> |
Subject: | Re: BUG #14866: The generated constraint in the typed table causes the server to crash |
Date: | 2017-11-01 14:05:46 |
Message-ID: | CAB7nPqSofu3i4kc1fEHpPTyDYKZ_DEEgE+n5uL_FKToMUYJ6DA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Wed, Nov 1, 2017 at 1:36 PM, Peter Eisentraut
<peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
> On 10/23/17 18:21, Michael Paquier wrote:
>> Attached is a patch to address the problem. There are a couple of
>> things to consider:
>> - transformColumnDefinition is missing the fact that a type may not be
>> set for a column defined, and as far as I can see the type name is
>> needed beforehand to allow the generation of all the serial commands.
>> This can happen when using CREATE TABLE OF, as you reported, for which
>> the data type can be found in the type defined. But this can happen as
>> well when declaring a child partition.
>
> I wonder whether we should even allow this. The SQL standard does not
> allow identity columns in typed tables, so there is support for that.
OK. At the same time being able to support that is not complicated
either, even if the patch I sent earlier is a bit grotty in the way it
does handle it. I can see arguments in favor of either solution.
> I'm not sure whether it makes sense in partitions. You are supposed to
> insert through the partition root, so making identity columns in
> partitions would just be confusing.
Robert, Amit, do you have opinions on the matter? It is possible to
have multiple level of partitions as well.
>> I am adding Peter E in CC, who is the author and committer of the
>> feature. I am adding an entry in the CF as well.
>
> There are two entries for this now. Maybe remove one?
Fixed.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | sathishr | 2017-11-02 07:57:06 | BUG #14884: Encoding Error |
Previous Message | Peter Eisentraut | 2017-11-01 13:36:12 | Re: BUG #14866: The generated constraint in the typed table causes the server to crash |