Trigger.. AFTER and BEFORE with specific column changed

From: Albert <oo_O2_oo(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Trigger.. AFTER and BEFORE with specific column changed
Date: 2012-04-01 18:45:39
Message-ID: 1333305939444-5610712.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

*I'm trying to follow this :*

CREATE TRIGGER check_update
*BEFORE* UPDATE ON accounts
FOR EACH ROW
WHEN (OLD.balance IS DISTINCT FROM NEW.balance)
EXECUTE PROCEDURE check_account_update();

*but with AFTER instead of BEFORE. and I'm keep getting error on or near
WHEN.
does that because i have to use BEFORE ? what if i need to execute the
procedure after updating column and it has really changed.*

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Trigger-AFTER-and-BEFORE-with-specific-column-changed-tp5610712p5610712.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jerry Sievers 2012-04-01 19:02:56 Parameter setting in multi-statement command; I got bit today
Previous Message Albert 2012-04-01 05:50:49 Re: PostgreSQL Trigger and rows updated