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

From Kevin Grittner
Subject Re: BEFORE UPDATE trigger doesn't change column value
Date
Msg-id 1365259743.76123.YahooMailNeo@web162903.mail.bf1.yahoo.com
Whole thread Raw
In response to Re: BEFORE UPDATE trigger doesn't change column value  (Kevin Grittner <kgrittn@ymail.com>)
Responses Re: BEFORE UPDATE trigger doesn't change column value
List pgsql-general
Kevin Grittner <kgrittn@ymail.com> wrote:

> Your BEFORE UPDATE trigger could leave the "synced" value in NEW
> alone if force_sync was false, and set "synced" to false
> otherwise.  It could then set NEW.force_sync to false, to leave you
> ready for the next update.

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.

--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-general by date:

Previous
From: brad st
Date:
Subject: Source code and database object identifiers
Next
From: Tom Lane
Date:
Subject: Re: Source code and database object identifiers