Re: [HACKERS] dropping partitioned tables without CASCADE
От | Simon Riggs |
---|---|
Тема | Re: [HACKERS] dropping partitioned tables without CASCADE |
Дата | |
Msg-id | CANP8+jLWKEfUrDXzicKRPDbZ_LmdN7N0wqAVAyt=-swWmLaJnw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] dropping partitioned tables without CASCADE (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>) |
Список | pgsql-hackers |
On 5 March 2017 at 07:59, Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> wrote: >> >> I used a slight modification of the case mentioned on the docs. I >> confirm this fails repeatably for me on current HEAD. >> >> CREATE TABLE cities ( >> city_id bigserial not null, >> name text not null, >> population bigint >> ) PARTITION BY LIST (left(lower(name), 1)); >> >> CREATE TABLE cities_ab >> PARTITION OF cities ( >> CONSTRAINT city_id_nonzero CHECK (city_id != 0) >> ) FOR VALUES IN ('a', 'b') >> PARTITION BY RANGE (population); >> >> drop table cities; >> ERROR: cannot drop table cities because other objects depend on it >> DETAIL: table cities_ab depends on table cities >> HINT: Use DROP ... CASCADE to drop the dependent objects too. > > I think that's what this patch fixes. Do you see this behaviour after > applying the patch? It does seems as if I've made a mistake there. The patch passes. Thanks for checking. I will apply tomorrow if no further comments. -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления: