Should this require CASCADE?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Should this require CASCADE?
Дата
Msg-id 3639.1026340387@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: Should this require CASCADE?  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Re: Should this require CASCADE?  (Rod Taylor <rbt@zort.ca>)
Re: Should this require CASCADE?  (Curt Sampson <cjs@cynic.net>)
Список pgsql-hackers
Consider
CREATE TABLE foo (f1 int primary key);
CREATE TABLE bar (f1 int references foo);
DROP TABLE foo RESTRICT;

Should this succeed?  Or should it be necessary to say DROP CASCADE to
get rid of the foreign-key reference to foo?

Our historical behavior is to allow the drop, while issuing a notice
about implicit deletion of triggers.  But I think SQL92 intends that
CASCADE should be required.

(If you deduce from this question that a lot of Rod Taylor's pg_depend
patch is working here, you are right...)
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Lamar Owen
Дата:
Сообщение: Re: (A) native Windows port
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Should this require CASCADE?