Skip site navigation (1) Skip section navigation (2)

Re: basic trigger using OLD not working?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rick Casey <rick(dot)casey(at)colorado(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: basic trigger using OLD not working?
Date: 2005-02-24 22:25:10
Message-ID: 27979.1109283910@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-general
Rick Casey <rick(dot)casey(at)colorado(dot)edu> writes:
> Here is the code that creates the delete trigger:
> create trigger PEDIGREES_hist_del_trig
> AFTER DELETE
> on PEDIGREES
> EXECUTE PROCEDURE logPedigreesDel();

I think you forgot FOR EACH ROW.  By default, the above creates a
STATEMENT trigger, in which you don't have access to individual rows.

			regards, tom lane

In response to

Responses

pgsql-general by date

Next:From: Tom LaneDate: 2005-02-24 22:34:57
Subject: Re: [PATCHES] A way to let Vacuum warn if FSM settings are low.
Previous:From: Tom LaneDate: 2005-02-24 22:22:14
Subject: Re: Help with queries...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group