From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter T Mount <peter@retep.org.uk>
Cc: pgsql-interfaces <pgsql-interfaces@postgreSQL.org>
Subject: Re: [INTERFACES] Using Postgres's NOTIFY/LISTEN
Date: Wed, 02 Dec 1998 10:53:43 -0500
Message-ID: <2637.912614023@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.04.9812020640410.682-100000@maidast.retep.org.uk>
Peter T Mount <peter@retep.org.uk> writes:
> On Wed, 2 Dec 1998, John Bosch wrote:
>> I'm using Postgresql as the database for a Java application I am writing
>> and would like to use the NOTIFY/LISTEN feature of Postgres.
> Ok, you've got me thinking... It shouldn't be too difficult to add NOTIFY
> support. I'll have a look at it during this morning, and I'll get back to
> you.
NOTIFY is no problem --- there's no particular reason not to issue
NOTIFY as a plain SQL command. It's the LISTEN side of things that
will require some driver support.
Ideally, you'd like to be able to invoke an application-supplied
callback routine asynchronously when a notify message arrives.
I don't know enough about Java to know if it has a well-defined
event loop mechanism, but if it does and your driver can cause events
to be issued, you should be in fat city.
You might care to look at libpgtcl's listen support in 6.4 --- it
automatically issues LISTEN and UNLISTEN commands when the application
registers or deregisters a callback request.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, peter@retep.org.uk
Subject: Re: [INTERFACES] Using Postgres's NOTIFY/LISTEN
In-Reply-To: <2637.912614023@sss.pgh.pa.us>
* 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