Re: no partition pruning when partitioning using array type

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: no partition pruning when partitioning using array type
Дата
Msg-id 2652.1531247447@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: no partition pruning when partitioning using array type  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: no partition pruning when partitioning using array type  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> On 2018-Jul-09, Tom Lane wrote:
>> Suppose you did
>>
>> create domain overint as int;
>> create table pt (a overint) partition by range (a);
>> create table pt1 partition of pt for values from (0) to (100);
>>
>> and the system took it, and then you did
>>
>> alter domain overint add check (value > 100);
>>
>> What happens now?

> It scans the table to check whether any values violate that condition,
> and raises an error if they do:

> alvherre=# alter domain overint add check (value > 100);
> ERROR:  column "a" of table "ppt1" contains values that violate the new constraint

> This looks sensible behavior to me.

And what about those partition bound values?  They are now illegal
for the domain, so I would expect a dump/reload to fail, regardless
of whether there are any values in the table.

            regards, tom lane


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: no partition pruning when partitioning using array type
Следующее
От: Adrien Nayrat
Дата:
Сообщение: Re: New GUC to sample log queries