Re: BEFORE UPDATE trigger doesn't change column value - Mailing list pgsql-general

From Clemens Eisserer
Subject Re: BEFORE UPDATE trigger doesn't change column value
Date
Msg-id CAFvQSYSNpjtsM1X3MBt2-DSBH07aw=Mut0ZdSumBnrE-Xea5Bw@mail.gmail.com
Whole thread Raw
In response to Re: BEFORE UPDATE trigger doesn't change column value  (Kevin Grittner <kgrittn@ymail.com>)
List 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

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: procedure to contribute this community
Next
From: Tomas Vondra
Date:
Subject: Re: Hosting PG on AWS in 2013