DROP TABLE... CASCADE weirdness - Mailing list pgsql-hackers

From Alvaro Herrera
Subject DROP TABLE... CASCADE weirdness
Date
Msg-id Pine.LNX.4.44.0209132056560.17338-100000@cm-lcon1-46-187.cm.vtr.net
Whole thread Raw
Responses Re: DROP TABLE... CASCADE weirdness  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hackers,

Suppose I do

CREATE TABLE a (a int);
CREATE TABLE b () INHERITS (a);

And then I want to drop both tables:

regression=# DROP TABLE a, b;
NOTICE:  table b depends on table a
ERROR:  Cannot drop table a because other objects depend on it       Use DROP ...  CASCADE to drop the dependent
objectstoo
 


Oh, so I use CASCADE:

regression=# DROP TABLE a, b CASCADE;
NOTICE:  Drop cascades to table b
ERROR:  table "b" does not exist

I understand what's going on and how to get the desired behavior, but
it's weird and I think it should be fixed if possible.

-- 
Alvaro Herrera (<alvherre[a]atentus.com>)
"Endurecerse, pero jamas perder la ternura" (E. Guevara)



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: DROP COLUMN misbehaviour with multiple inheritance
Next
From: Tom Lane
Date:
Subject: Re: DROP TABLE... CASCADE weirdness