From: Owen Jacobson <ojacobson@osl.com>
To: Owen Jacobson <ojacobson@osl.com>
To: Bryce Nesbitt <bryce1@obviously.com>
To: pgsql-sql@postgresql.org
Subject: Re: Delete with join -- deleting related table entries?
Date: Wed, 8 Feb 2006 09:35:14 -0800
Message-ID: <144D12D7DD4EC04F99241498BB4EEDCC20CC5A@nelson.osl.com> (raw)
Owen Jacobson wrote:
> BEGIN;
> DELETE FROM note WHERE issue_id IN (SELECT issue_id FROM isuse
> WHERE reservation_id = reservation_to_delete);
> DELETE FROM isuse WHERE reservation_id = reservation_to_delete;
> DELETE FROM reservations WHERE reservation_id =
> reservation_to_delete;
> END;
That should be COMMIT;, not END;. Been writing too much pl/pgsql.
-Owen
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: ojacobson@osl.com, bryce1@obviously.com
Subject: Re: Delete with join -- deleting related table entries?
In-Reply-To: <144D12D7DD4EC04F99241498BB4EEDCC20CC5A@nelson.osl.com>
* 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