| From: | Alvaro Herrera <alvherre(at)atentus(dot)com> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | DROP TABLE... CASCADE weirdness |
| Date: | 2002-09-14 01:01:23 |
| Message-ID: | Pine.LNX.4.44.0209132056560.17338-100000@cm-lcon1-46-187.cm.vtr.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 objects too
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)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2002-09-14 02:50:27 | Re: DROP TABLE... CASCADE weirdness |
| Previous Message | Alvaro Herrera | 2002-09-14 00:56:32 | Re: DROP COLUMN misbehaviour with multiple inheritance |