Re: undeleteable records

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Ryan Mahoney <ryan(at)paymentalliance(dot)net>
Cc: Justin Clift <justin(at)postgresql(dot)org>, Tara Cooper <carat(at)pantz(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: undeleteable records
Date: 2001-07-18 11:22:08
Message-ID: 200107181122.f6IBM8d21056@jupiter.us.greatbridge.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ryan Mahoney wrote:
> Hey Justin - Tara and I figured out that a trigger on this table - which is
> supposed to archive deleted information - blocks deletes altogether. We
> lifted this trigger from open ACS... we are having some difficulties with
> all such triggers. When we re-create the table w/o the trigger all is
> well. Hope to get some time to figure out what is wrong with these damn
> triggers! ;)

All BEFORE triggers suppress the original operation when
returning NULL instead of NEW/OLD (NEW on INSERT/UPDATE, OLD
on DELETE). The return value of AFTER triggers is ignored.

Could it be that the triggers where designed to be AFTER
triggers and you accidentially declared them as BEFORE?

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Raymond Chui 2001-07-18 12:18:31 What is the syntax turn off auto commit?
Previous Message Nils Zonneveld 2001-07-18 09:31:54 Re: PG rules! (RULES being the word ;->)