From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: no partition pruning when partitioning using array type |
Date: | 2018-07-10 18:30:47 |
Message-ID: | 2652.1531247447@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alvaro Herrera <alvherre(at)2ndquadrant(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Adrien Nayrat | 2018-07-10 18:34:15 | Re: New GUC to sample log queries |
Previous Message | Alvaro Herrera | 2018-07-10 18:18:57 | Re: no partition pruning when partitioning using array type |