Re: BEFORE UPDATE trigger doesn't change column value

From: Clemens Eisserer <linuxhippy(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: BEFORE UPDATE trigger doesn't change column value
Date: 2013-04-07 14:49:47
Message-ID: CAFvQSYSNpjtsM1X3MBt2-DSBH07aw=Mut0ZdSumBnrE-Xea5Bw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Kevin,

Sorry, that's the wrong way around. I should have said:
>
> Your BEFORE UPDATE trigger could leave the "synced" value in NEW
> alone if force_sync was **true**, and set "synced" to false
> otherwise. It could then set NEW.force_sync to false, to leave you
> ready for the next update.
>

Thanks for your advice (and the patience on this list in general).
Instead of using two columns, I now use an integer-column and set it to a
value taken from an incrementing sequence.

Thanks again, Clemens

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tomas Vondra 2013-04-07 15:38:04 Re: Hosting PG on AWS in 2013
Previous Message Adrian Klaver 2013-04-07 14:23:08 Re: procedure to contribute this community