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

Re: implementing asynchronous notifications PLEASE CONFIRM

From: Kris Jurka <books(at)ejurka(dot)com>
To: David Gagnon <dgagnon(at)siunik(dot)com>
Cc: Andres Olarte <olarte(dot)andres(at)gmail(dot)com>,pgsql-jdbc(at)postgresql(dot)org
Subject: Re: implementing asynchronous notifications PLEASE CONFIRM
Date: 2005-08-26 06:19:38
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc

On Thu, 25 Aug 2005, David Gagnon wrote:

>      I look more deeply with solution #1 but the big problem seem to be the 
> lack of flexibility with the notify mechanism...  In the trigger I would send 
> something like
> To say table row with id 111 on table X have been updated ...But I I need to 
> explicitly LISTEN on a Channel (or identifier) .. How can I get this 
> notification on the client.

Right, you'd have to say: LISTEN "TABLEX:UPDATE:111".  Generally 
LISTEN/NOTIFY is used at a much coarser grain because of this restriction 
as well as the possibility of multiple notifies (for the same target) 
being combined and the client only getting one notification.

Instead of listening for a very specific action, the listening code is 
triggered to go figure out what happened.  In your situation perhaps 
flushing the entire cache for that event is best instead of trying to make 
a very specific alteration.

Kris Jurka

In response to


pgsql-jdbc by date

Next:From: David GagnonDate: 2005-08-26 18:09:00
Subject: Re: implementing asynchronous notifications PLEASE CONFIRM MY
Previous:From: Kris JurkaDate: 2005-08-26 06:12:27
Subject: Re: Is this error correct/possible?

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