Re: Can a database notify all clients when something changes? - Mailing list pgsql-general

From Guy Rouillier
Subject Re: Can a database notify all clients when something changes?
Date
Msg-id CC1CF380F4D70844B01D45982E671B2348E4B9@mtxexch01.add0.masergy.com
Whole thread Raw
In response to Can a database notify all clients when something changes?  (Satan Devil <very709394bad@yahoo.com>)
List pgsql-general
Satan Devil wrote:
> Suppose that there are 3 workstations connected to a
> central database. When Workstation A changes
> something, Workstation B and C must get the changes.

Not really clear what you are trying to accomplish.  The simple fact
that all 3 workstations are communicating with a central database means
that they all "get the changes".  Are you saying that B and C might be
displaying the old version of data that A has just changed, and you want
B and C to automatically see the updated values?  If that is what you
are after, then you'll need to do something application-wise.  What
application are these clients using to view data?  You can either (1)
broadcast changes entirely through your application, or (2) set up a
trigger in the database to kick off the notifications.  Depending on how
many changes you want to monitor, solution 2 might be burdensome (lots
of triggers.)

--
Guy Rouillier


pgsql-general by date:

Previous
From: Chris Smith
Date:
Subject: Re: Insert do not work in my case
Next
From: Alvaro Herrera
Date:
Subject: Re: Can a database notify all clients when something changes?