Subject: RESTRICT / CASCADE

From: Rod Taylor <[email-masked]>
Date: 07 Sep 2002 15:30:50 -0400

This note is currently in the 'Dependency Tracking (2.8)' section:

Note:  According to the SQL standard, specifying either RESTRICT or
CASCADE is required. No database system actually implements it that way,
but the defaults might be different. 

If the defaults are different, perhaps the documentation should show
it's examples using RESTRICT or CASCADE explicitly?

---

From: Rod Taylor <[email-masked]>
Date: 09 Sep 2002 14:39:05 -0400

On Mon, 2002-09-09 at 14:40, Peter Eisentraut wrote:
> Rod Taylor writes:

> Also, in most examples the choice between RESTRICT and CASCADE would have
> to be arbitrarily made by the documentation writer and might not be what
> the user really wanted to do.

Good points.  I suppose anyone paying enough attention to notice that
our behaviour restricts where others casacade will quickly realize what
they need to do.

-- 
  Rod Taylor

---

From: Peter Eisentraut <[email-masked]>
Date: Mon, 9 Sep 2002 20:40:23 +0200 (CEST)

> it's examples using RESTRICT or CASCADE explicitly?

Well, we're describing PostgreSQL, not other database systems that might
act differently.

I believe most SQL guides/books/courses/etc. simply use DROP TABLE name;
and this has also been historical practice in PostgreSQL, so we would
confuse users pretty heavily by adding RESTRICT or CASCADE everywhere.

-- 
Peter Eisentraut   [email-masked]

---

From: Tom Lane <[email-masked]>
Date: Mon, 09 Sep 2002 15:24:18 -0400

> but the defaults might be different. 

The note is perhaps not very well worded.  No one actually requires you
to say RESTRICT or CASCADE, but there are some systems where the default
assumption is CASCADE.  I think everyone here agrees that that's a
ridiculously dangerous default, so it's quite unlikely that PG's
behavior would ever vary from what it is now.

> it's examples using RESTRICT or CASCADE explicitly?

No, that's just pointless pedantry.

			regards, tom lane