Received: from smtp010.mail.yahoo.com (smtp010.mail.yahoo.com [216.136.173.30]) by postgresql.org (8.11.3/8.11.1) with SMTP id f3PL5Q389410 for ; Wed, 25 Apr 2001 17:05:26 -0400 (EDT) (envelope-from janwieck@yahoo.com) Received: from jupiter.us.greatbridge.com (HELO jupiter.jw.home) (65.196.69.55) by smtp.mail.vip.sc5.yahoo.com with SMTP; 25 Apr 2001 21:05:24 -0000 X-Apparently-From: Received: (from janwieck@localhost) by jupiter.jw.home (8.9.3/8.9.3) id QAA30608; Wed, 25 Apr 2001 16:17:22 -0500 From: Jan Wieck Message-Id: <200104252117.QAA30608@jupiter.jw.home> Subject: Re: Error explaination? In-Reply-To: from Josh Berkus at "Apr 25, 2001 12:15:51 pm" To: Josh Berkus Date: Wed, 25 Apr 2001 16:17:19 -0500 (EST) CC: pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL68 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archive-Number: 200104/389 X-Sequence-Number: 2747 Josh Berkus wrote: > Folks, > > I have a fuction that creates a record in a table called user_locks, > does a bunch of stuff, then deletes the record. However, when I try to > run it, I get the following error: > > ERROR: triggered data change violation on relation "user_locks" > > It appears that the function handler won't let me create, then delete > the same record. What goes on? You have a foreign key constraint or other triggers on that "user_locks" table. This is a known misbehaviour (not to call it a bug) that we keep since having deferrable referential integrity. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com # _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com