From: Glenn MacGregor <gtm@oracom.com>
To: pgsql-sql@postgresql.org
Subject: Transaction and cascade problem
Date: Thu, 20 Dec 2001 08:32:26 -0500
Message-ID: <00ad01c1895a$c3d5df80$4d00a8c0@catamount> (raw)
Hi All,
I have postgres 7.1 set up with two tables (groups, users). groups has 2 columns name, groupid where id is the primary key autoincrement and name is unique. users has 3 columns name, userid, groupid. I have a constraint on users which says that groupid must exists in the group table. I also have a cascade delete on the groups table to delete any users that are in the group I am removing. I regular (no transaction) mode everything works fine. When I start a transaction and I add a group to the group table, then delete it before a commit or rollback I get the following error:
ERROR: triggered data change violation on relation "groups"
After that the transaction must be rolledback. Any clues?
Thanks
Glenn
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: gtm@oracom.com
Subject: Re: Transaction and cascade problem
In-Reply-To: <00ad01c1895a$c3d5df80$4d00a8c0@catamount>
* 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