Re: Query related to alter table ... attach partition

Поиск
Список
Период
Сортировка
От Ashutosh Bapat
Тема Re: Query related to alter table ... attach partition
Дата
Msg-id CAFjFpRcxJo1+t8qeLsQ-KG+f7mt0HEQDLx=CyOpAQzm9R6fJJQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Query related to alter table ... attach partition  (Ashutosh Sharma <ashu.coek88@gmail.com>)
Список pgsql-hackers
On Tue, Jan 23, 2018 at 12:25 PM, Ashutosh Sharma <ashu.coek88@gmail.com> wrote:
>>
>
> That's right. But, shouldn't a partition that not at all fall in the
> partition range be rejected when user tries to attach it. I feel we
> should at least try throwing a WARNING message for it. Thoughts?
>

One can add constraints contradicting the partition constraints after
the table is attached as partition. Moreover, one can add multiple
constraints over the time that together contradict partition
constraints. I don't think it's worth the effort to make sure that all
constraints taken together contradict partition constraints or not.
The downside is simply that the partition will remain empty forever,
but then that's what user wants, since s/he has added the constraints.

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


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

Предыдущее
От: Nikhil Sontakke
Дата:
Сообщение: Re: Logical Decoding and HeapTupleSatisfiesVacuum assumptions
Следующее
От: Amit Langote
Дата:
Сообщение: Re: unique indexes on partitioned tables