Re: Event-driven programming? - Mailing list pgsql-general

From Erik Jones
Subject Re: Event-driven programming?
Date
Msg-id B2B1A223-5D0F-4B11-BC11-0B167D8C9799@myemma.com
Whole thread Raw
In response to Re: Event-driven programming?  (Richard Broersma Jr <rabroersma@yahoo.com>)
List pgsql-general
On Sep 12, 2007, at 11:51 AM, Richard Broersma Jr wrote:

> --- Jay Dickon Glanville <dickon.glanville@gmail.com> wrote:
>
>> Is it possible for PostgreSQL to notify me of a successful
>> transaction commit?
>
> I've haven't used it yet, but will LISTEN and NOTIFY work for you?
>
> http://www.postgresql.org/docs/8.2/static/sql-listen.html
> http://www.postgresql.org/docs/8.2/static/sql-notify.html
>

I don't see how he could wire that up (or, anything) for per-
transaction notifications.  I'll also point out that the solution for
his use-case, keeping an up-to-date application level cache of data,
is normally implemented at the application layer, often using
something like memcached.  However, if he can narrow his "events"
down to specific tables, then he can use the LISTEN/NOTIFY mechanism
with triggers on those tables to good effect.

Erik Jones

Software Developer | Emma®
erik@myemma.com
800.595.4401 or 615.292.5888
615.292.0777 (fax)

Emma helps organizations everywhere communicate & market in style.
Visit us online at http://www.myemma.com



pgsql-general by date:

Previous
From: "Pavel Stehule"
Date:
Subject: Re: Event-driven programming?
Next
From: Alvaro Herrera
Date:
Subject: Re: problems with large table