Skip site navigation (1) Skip section navigation (2)

Re: How to find out that a record has been updated

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "P(dot)V(dot) Subramanian" <pvsmian(at)hotmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: How to find out that a record has been updated
Date: 2001-10-05 19:08:34
Message-ID: 20665.1002308914@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
"P.V. Subramanian" <pvsmian(at)hotmail(dot)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

In response to

pgsql-novice by date

Next:From: Josh BerkusDate: 2001-10-05 20:26:58
Subject: Re: The mystery of concurrent access
Previous:From: P.V. SubramanianDate: 2001-10-05 18:59:13
Subject: Why has the trigger been launched

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group