pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
RESTRICT / CASCADE
4+ messages / 3 participants
[nested] [flat]

* RESTRICT / CASCADE
@ 2002-09-07 19:30 Rod Taylor <rbt@zort.ca>
  2002-09-09 18:40 ` Re: RESTRICT / CASCADE Peter Eisentraut <peter_e@gmx.net>
  2002-09-09 19:24 ` Re: RESTRICT / CASCADE Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 4+ messages in thread

From: Rod Taylor @ 2002-09-07 19:30 UTC (permalink / raw)
  To: pgsql-docs

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?





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: RESTRICT / CASCADE
  2002-09-07 19:30 RESTRICT / CASCADE Rod Taylor <rbt@zort.ca>
@ 2002-09-09 18:40 ` Peter Eisentraut <peter_e@gmx.net>
  2002-09-09 18:39   ` Re: RESTRICT / CASCADE Rod Taylor <rbt@zort.ca>
  1 sibling, 1 reply; 4+ messages in thread

From: Peter Eisentraut @ 2002-09-09 18:40 UTC (permalink / raw)
  To: Rod Taylor <rbt@zort.ca>; +Cc: pgsql-docs

Rod Taylor writes:

> If the defaults are different, perhaps the documentation should show
> 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.

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.

-- 
Peter Eisentraut   peter_e@gmx.net




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: RESTRICT / CASCADE
  2002-09-07 19:30 RESTRICT / CASCADE Rod Taylor <rbt@zort.ca>
  2002-09-09 18:40 ` Re: RESTRICT / CASCADE Peter Eisentraut <peter_e@gmx.net>
@ 2002-09-09 18:39   ` Rod Taylor <rbt@zort.ca>
  0 siblings, 0 replies; 4+ messages in thread

From: Rod Taylor @ 2002-09-09 18:39 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-docs

On Mon, 2002-09-09 at 14:40, Peter Eisentraut wrote:
> Rod Taylor writes:
> 
> > If the defaults are different, perhaps the documentation should show
> > it's examples using RESTRICT or CASCADE explicitly?

> 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




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: RESTRICT / CASCADE
  2002-09-07 19:30 RESTRICT / CASCADE Rod Taylor <rbt@zort.ca>
@ 2002-09-09 19:24 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 4+ messages in thread

From: Tom Lane @ 2002-09-09 19:24 UTC (permalink / raw)
  To: Rod Taylor <rbt@zort.ca>; +Cc: pgsql-docs

Rod Taylor <rbt@zort.ca> writes:
> 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. 

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.

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

No, that's just pointless pedantry.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2002-09-09 19:24 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-09-07 19:30 RESTRICT / CASCADE Rod Taylor <rbt@zort.ca>
2002-09-09 18:40 ` Peter Eisentraut <peter_e@gmx.net>
2002-09-09 18:39   ` Rod Taylor <rbt@zort.ca>
2002-09-09 19:24 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox