Re: Setting NEW in AFTER trigger - Mailing list pgsql-general

From Tom Lane
Subject Re: Setting NEW in AFTER trigger
Date
Msg-id 2704.1229359509@sss.pgh.pa.us
Whole thread Raw
In response to Setting NEW in AFTER trigger  (Robert Fitzpatrick <lists@webtent.net>)
List pgsql-general
Robert Fitzpatrick <lists@webtent.net> writes:
> Is it not possible to set the value of a field by reference of NEW.field
> in an AFTER trigger?

An AFTER trigger can't retroactively affect the update that already
happened, if that's what you're imagining this would do.  Use a BEFORE
trigger if you want to affect what gets stored.

            regards, tom lane

pgsql-general by date:

Previous
From: Robert Fitzpatrick
Date:
Subject: Setting NEW in AFTER trigger
Next
From: Chris Browne
Date:
Subject: Re: Relational database design book