Re: How to find out that a record has been updated - Mailing list pgsql-novice

From Tom Lane
Subject Re: How to find out that a record has been updated
Date
Msg-id 20665.1002308914@sss.pgh.pa.us
Whole thread Raw
In response to How to find out that a record has been updated  ("P.V. Subramanian" <pvsmian@hotmail.com>)
List pgsql-novice
"P.V. Subramanian" <pvsmian@hotmail.com> writes:
> If some records have been updated or added, the app does some work, and
> marks the record as processed.

> Currently anyone updating a record is expected to mark it manually as
> needing processing. Otherwise the application doesn't know.

> Is there a better, more user friendly way, for the app to automatically find
> out which records have been updated.

You don't need to change the table definition; just add an ON UPDATE
trigger that forces the marking column to be updated.

            regards, tom lane

pgsql-novice by date:

Previous
From: "P.V. Subramanian"
Date:
Subject: Why has the trigger been launched
Next
From: "Josh Berkus"
Date:
Subject: Re: The mystery of concurrent access