Re: Trigger.. AFTER and BEFORE with specific column changed

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Albert <oo_O2_oo(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Trigger.. AFTER and BEFORE with specific column changed
Date: 2012-04-02 13:53:50
Message-ID: 1760.1333374830@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Albert <oo_O2_oo(at)hotmail(dot)com> writes:
> *i get:*
> Syntax error at or near 'WHEN'
> LINE 1: ... check_update AFTER UPDATE ON accounts FOR EACH ROW WHEN
> (OLD.balance IS DISTINCT FROM NEW.balance) ....

Does the BEFORE case work for you either? I'm suspicious that you
are using a PG version that predates WHEN-clause support in triggers.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dave Page 2012-04-02 14:09:36 Re: Switching to Homebrew as recommended Mac install?
Previous Message Yvon Thoraval 2012-04-02 13:40:38 Mac OS X Lion how to connect to remote server ?