Re: delete with cascade

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Martín Marqués <martin(at)bugs(dot)unl(dot)edu(dot)ar>
Cc: pgsql-sql(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: delete with cascade
Date: 2001-05-04 22:06:24
Message-ID: Pine.BSF.4.21.0105041505370.61624-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql


On Wed, 2 May 2001, [iso-8859-1] Martn Marqus wrote:

> I was reading the manuals on DELETE and I saw this:
>
> By default DELETE will delete tuples in the table specified and all its
> sub-tables. If you wish to only update the specific table mentioned, you
> should use the ONLY clause.

Any table that inherit from this table.

> I just don't understand what sub-tables means. Does it mean that it will
> delete rows on other tables which are referenced with a FOREIGN KEY to the
> row which will be deleted?

Only if you defined the foreign key with ON DELETE CASCADE.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message newsreader 2001-05-04 22:08:03 Re: a primer on trigger?
Previous Message newsreader 2001-05-04 22:02:33 Re: Re: a primer on trigger?

Browse pgsql-sql by date

  From Date Subject
Next Message Bruce Momjian 2001-05-04 22:08:34 Re: Re: Use of the LIMIT clause ?
Previous Message Cliff Crawford 2001-05-04 21:58:16 Re: Dateadd