Re: [HACKERS] dropping partitioned tables without CASCADE - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: [HACKERS] dropping partitioned tables without CASCADE
Date
Msg-id CANP8+jLWKEfUrDXzicKRPDbZ_LmdN7N0wqAVAyt=-swWmLaJnw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] dropping partitioned tables without CASCADE  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
List 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 by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: [HACKERS] patch: function xmltable
Next
From: Pavan Deolasee
Date:
Subject: Re: [HACKERS] Cleanup: avoid direct use of ip_posid/ip_blkid