DROP TABLE... CASCADE weirdness

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема DROP TABLE... CASCADE weirdness
Дата
Msg-id Pine.LNX.4.44.0209132056560.17338-100000@cm-lcon1-46-187.cm.vtr.net
обсуждение исходный текст
Ответы Re: DROP TABLE... CASCADE weirdness  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: DROP COLUMN misbehaviour with multiple inheritance
Следующее
От: Tom Lane
Дата:
Сообщение: Re: DROP TABLE... CASCADE weirdness