Re: Should this require CASCADE?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Should this require CASCADE?
Дата
Msg-id 20020710153415.W55712-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Should this require CASCADE?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Should this require CASCADE?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, 10 Jul 2002, Tom Lane wrote:

> 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.

I think the above should fail.  If someone was adding restrict since it
was optional, I'd guess they were doing so in advance for the days when
we'd actually restrict the drop.



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Should this require CASCADE?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Should this require CASCADE?