Received: from datasoft.com (maniac.datasoft.com [63.228.155.187]) by postgresql.org (8.11.3/8.11.1) with SMTP id f6BNNra16872 for ; Wed, 11 Jul 2001 19:23:53 -0400 (EDT) (envelope-from kristis.makris@datasoft.com) Message-Id: <200107112323.f6BNNra16872@postgresql.org> Received: (qmail 16372 invoked from network); 11 Jul 2001 23:23:48 -0000 Received: from dsco-user.datasoft.com (HELO leonidas.corp.datasoft.com) (63.228.155.190) by maniac.datasoft.com with SMTP; 11 Jul 2001 23:23:48 -0000 Subject: Re: trigger on DELETE From: Kristis Makris To: Phuong Ma Cc: pgsql sql , Postgres-general In-Reply-To: <3B4CD9B7.B79DF11D@commandprompt.com> Content-Type: text/plain X-Mailer: Evolution (0.9/+cvs.2001.03.14.20.47 - Preview Release) Date: 11 Jul 2001 16:23:48 -0700 Mime-Version: 1.0 X-Archive-Number: 200107/154 X-Sequence-Number: 3946 > Ok, the function works only with a trigger that is defined as ON INSERT > OR UPDATE. If I try to define a trigger for ON DELETE and then delete a > row from the table, there is nothing in the 'NEW' variable to return. I > get an error message. If I define the function to return NULL, 0, or > nothing, then it comes up with a type mis-match error. Is there anyone > who can help? Thanks. Try using the OLD variable instead.