Re: Oddity in COPY FROM handling of check constraints on partition tables

Поиск
Список
Период
Сортировка
От Ashutosh Bapat
Тема Re: Oddity in COPY FROM handling of check constraints on partition tables
Дата
Msg-id CAFjFpReWH=JuGL2cGRabADg4PUWF3WRbGE1fAuX6uD8dBXLxOQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Oddity in COPY FROM handling of check constraints on partitiontables  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Ответы Re: Oddity in COPY FROM handling of check constraints on partitiontables  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
Список pgsql-hackers
On Wed, Mar 28, 2018 at 6:58 AM, Amit Langote
<Langote_Amit_f8@lab.ntt.co.jp> wrote:
>> which violates the constraint on the column b (ie, b > 0), so this
>> should abort.  The reason for that is because CopyFrom looks at the
>> parent relation's constraints, not the partition's constraints, when
>> checking the constraint against the input row.
>
> Good catch, thanks!
>

+1

>> Attached is a patch for fixing this issue.
>
> That looks good to me.  This one would need to be back-patched to v10.
Thanks. Please add to the next commitfest so that it doesn't get lost.
We can not add this to v11 open items since it isn't a v11 bug
exactly.


-- 
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: [HACKERS] path toward faster partition pruning
Следующее
От: Amit Langote
Дата:
Сообщение: Re: [HACKERS] path toward faster partition pruning