Re: [GENERAL] delete with cascade

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: [GENERAL] delete with cascade
Дата
Msg-id Pine.BSF.4.21.0105041505370.61624-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на delete with cascade  (Martín Marqués <martin@bugs.unl.edu.ar>)
Список pgsql-sql
On Wed, 2 May 2001, [iso-8859-1] Mart�n Marqu�s 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.


В списке pgsql-sql по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: delete with cascade
Следующее
От: Tom Lane
Дата:
Сообщение: Re: create table