Received: from degroens.oracom.com (degroens.oracom.com [63.238.138.68]) by postgresql.org (8.11.3/8.11.4) with SMTP id fBKDhQm97511 for ; Thu, 20 Dec 2001 08:43:26 -0500 (EST) (envelope-from gtm@oracom.com) Received: (qmail 23107 invoked from network); 20 Dec 2001 06:41:19 -0000 Received: from unknown (HELO catamount) (192.168.253.253) by 192.168.253.2 with SMTP; 20 Dec 2001 06:41:19 -0000 Message-ID: <00e401c1895c$ee8e8a40$4d00a8c0@catamount> From: "Glenn MacGregor" To: Subject: Transaction and cascade problem Date: Thu, 20 Dec 2001 08:47:57 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00E1_01C18933.05B267C0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200112/216 X-Sequence-Number: 6038 This is a multi-part message in MIME format. ------=_NextPart_000_00E1_01C18933.05B267C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi All, I have postgres 7.1 set up with two tables (groups, users). groups has 2 c= olumns 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 syas 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 g= roup 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 del= ete 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 ------=_NextPart_000_00E1_01C18933.05B267C0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi All,
 
I have postgres 7.1 set up with two tables= (groups,=20 users).  groups has 2 columns name, groupid where id is the prima= ry=20 key autoincrement and name is unique.  users has 3 columns name,= =20 userid, groupid.  I have a constraint on users which syas that groupid= must=20 exists in the group table.  I also have a cascade delete on the groups= =20 table to delete any users that are in the group I am removing.  I regu= lar=20 (no transaction) mode everything works fine.  When I start a transacti= on=20 and I add a group to the group table, then delete it before a commit or rol= lback=20 I get the following error:
 
ERROR: triggered data change violation on = relation=20 "groups"
 
After that the transaction must be=20 rolledback.  Any clues?
 
    Thanks
 
       =20        =20 Glenn
------=_NextPart_000_00E1_01C18933.05B267C0--