From: Tom Lane <tgl@sss.pgh.pa.us>
To: michael.mattox@verideon.com
Cc: pgsql-sql@postgresql.org
Subject: Re: How to delete multiple rows from multiple joined tables
Date: Mon, 26 May 2003 12:55:42 -0400
Message-ID: <2306.1053968142@sss.pgh.pa.us> (raw)
In-Reply-To: <CJEBLDCHAADCLAGIGCOOAEMHCHAA.michael.mattox@verideon.com>
References: <CJEBLDCHAADCLAGIGCOOAEMHCHAA.michael.mattox@verideon.com>
"Michael Mattox" <michael.mattox@verideon.com> writes:
> I want to delete all rows in table C & B that correspond to a row in Table
> A.
Depending on how automatic you want that to be, perhaps foreign keys
would do what you want? You could set up B's and C's links to A as
"on delete cascade" foreign keys, and then a deletion from A would
clean them up too.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, michael.mattox@verideon.com
Subject: Re: How to delete multiple rows from multiple joined tables
In-Reply-To: <2306.1053968142@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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