Should this require CASCADE?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Should this require CASCADE?
Date: 2002-07-10 22:33:07
Message-ID: 3639.1026340387@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephan Szabo 2002-07-10 22:45:24 Re: Should this require CASCADE?
Previous Message Lamar Owen 2002-07-10 22:08:51 Re: (A) native Windows port