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

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
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:30:43
Message-ID: 4F79AA03.9050501@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 04/01/2012 10:10 PM, Albert wrote:
> *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) ....

Hmmm. So two questions:

What happens if you copy the example in the docs exactly and use NEW.*
and OLD.*?

What is the table definition for accounts?

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

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Yvon Thoraval 2012-04-02 13:40:38 Mac OS X Lion how to connect to remote server ?
Previous Message Mike Roest 2012-04-02 12:43:03 Re: [HACKERS] Re: pg_dump incredibly slow dumping a single schema from a large db