Re: Should this require CASCADE?
От | Tom Lane |
---|---|
Тема | Re: Should this require CASCADE? |
Дата | |
Msg-id | 5153.1026341973@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Should this require CASCADE? (Stephan Szabo <sszabo@megazone23.bigpanda.com>) |
Ответы |
Re: Should this require CASCADE?
|
Список | pgsql-hackers |
Stephan Szabo <sszabo@megazone23.bigpanda.com> writes: > On Wed, 10 Jul 2002, Tom Lane wrote: >> 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? > 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. Sorry if I wasn't clear: we never had the RESTRICT/CASCADE syntax at all until now. What I'm intending though is that DROP with no option will default to DROP RESTRICT, which means that a lot of cases that used to be "gotchas" will now fail until you say CASCADE. I wrote RESTRICT in my example just to emphasize that the intended behavior is RESTRICT. So if you prefer, imagine same example but you merely sayDROP TABLE foo; Does your answer change? regards, tom lane
В списке pgsql-hackers по дате отправления: