From: Kris Jurka <books@ejurka.com>
To: David Gagnon <dgagnon@siunik.com>
Cc: Andres Olarte <olarte.andres@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: implementing asynchronous notifications PLEASE CONFIRM
Date: Fri, 26 Aug 2005 01:19:38 -0500 (EST)
Message-ID: <Pine.BSO.4.62.0508260112370.3794@leary.csoft.net> (raw)
In-Reply-To: <430E235F.5090708@siunik.com>
References: <Pine.LNX.4.44.0504110519590.13042-200000@ns.surfnonstop.com>
<4265A05C.6050302@opencloud.com>
<42667C72.9070708@siunik.com>
<4266E296.6050105@opencloud.com>
<4308AF3A.2070400@siunik.com>
<3fccaa69050825111150ebdf05@mail.gmail.com>
<430E235F.5090708@siunik.com>
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
>
> NOTIFY "TABLEX:UPDATE:111";
>
> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: books@ejurka.com, dgagnon@siunik.com, olarte.andres@gmail.com
Subject: Re: implementing asynchronous notifications PLEASE CONFIRM
In-Reply-To: <Pine.BSO.4.62.0508260112370.3794@leary.csoft.net>
References: <Pine.LNX.4.44.0504110519590.13042-200000@ns.surfnonstop.com> <4265A05C.6050302@opencloud.com> <42667C72.9070708@siunik.com> <4266E296.6050105@opencloud.com> <4308AF3A.2070400@siunik.com> <3fccaa69050825111150ebdf05@mail.gmail.com> <430E235F.5090708@siunik.com> <Pine.BSO.4.62.0508260112370.3794@leary.csoft.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox