Rushabh Lathia wrote:
> CREATE TABLE foo (a INT, b INT, c VARCHAR) PARTITION BY LIST(a);
> CREATE TABLE foo_p1 PARTITION OF foo FOR VALUES IN (1,2);
> CREATE TABLE foo_p2 PARTITION OF foo FOR VALUES IN (3,4);
> INSERT INTO foo select i,i,i from generate_series(1,4)i;
>
> CREATE TABLE foo_d (like foo);
> INSERT INTO foo_d select i,i,i from generate_series(1,9)i;
>
> ALTER TABLE foo ATTACH PARTITION foo_d DEFAULT;
>
> Above ATTACH PARTITION should fail with "partition constraint is violated"
> error, but instead it's working on a master branch.
Hmm, offhand I don't quite see why this error fails to be thrown.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services