Cascading Deletes

Поиск
Список
Период
Сортировка
От Craig May
Тема Cascading Deletes
Дата
Msg-id 20000906172126.A4216@s2.enthdimension.com.au
обсуждение исходный текст
Ответы 8K Limit, and Replication  (Poet/Joshua Drake <poet@linuxports.com>)
Re: Cascading Deletes  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-sql
Hi,

I have a tables having this structure:

ID (int) | _ID (int) | Name (String)


_ID is the parent of ID.

I'm looking for the best method to perform a cascade delete.  For example, I
delete _ID, it in turn deletes ID, and should ID also be an entry within _ID, it
would continue through the chain.

For example:

0 0 Base
1 0 Sib1
2 0 Sib2
3 0 Sib3
4 1 Sib1_1
5 1 Sib1_2


Deleting Base would remove all the entries.  Deleting Sib1 would delete Sib1_1
and Sib1_2.
Can anyone help out here?

Regards,
Craig May

Enth Dimension
http://www.enthdimension.com.au



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

Предыдущее
От: "Igor N. Avtaev"
Дата:
Сообщение: Re: [ADMIN] 7.0.2 questions on encoding and compilation
Следующее
От: Poet/Joshua Drake
Дата:
Сообщение: 8K Limit, and Replication