On 27 February 2017 at 02:38, Amit Langote <langote_amit...@lab.ntt.co.jp> wrote: > On 2017/02/26 5:30, Simon Riggs wrote: >> On 23 February 2017 at 16:33, Simon Riggs <si...@2ndquadrant.com> wrote: >> >>> I'll be happy to review >> >> Patch looks OK so far, but fails on a partition that has partitions, >> probably because of the way we test relkind in the call to >> StoreCatalogInheritance1(). > > Thanks for the review. > > I could not reproduce the failure you are seeing; could you perhaps share > the failing test case?
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 notice also that \d+ <tablename> does not show which partitions have subpartitions. I'm worried that these things illustrate something about the catalog representation that we may need to improve, but I don't have anything concrete to say on that at present. -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers