From: | Erik Jones <erik(at)myemma(dot)com> |
---|---|
To: | Richard Broersma Jr <rabroersma(at)yahoo(dot)com> |
Cc: | Jay Dickon Glanville <dickon(dot)glanville(at)gmail(dot)com>, PostgreSQL General ML <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Event-driven programming? |
Date: | 2007-09-12 17:00:29 |
Message-ID: | B2B1A223-5D0F-4B11-BC11-0B167D8C9799@myemma.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sep 12, 2007, at 11:51 AM, Richard Broersma Jr wrote:
> --- Jay Dickon Glanville <dickon(dot)glanville(at)gmail(dot)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(at)myemma(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2007-09-12 17:01:16 | Re: problems with large table |
Previous Message | Pavel Stehule | 2007-09-12 16:52:51 | Re: Event-driven programming? |