Re: Event-driven programming?

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Jay Dickon Glanville" <dickon(dot)glanville(at)gmail(dot)com>
Cc: "PostgreSQL General ML" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Event-driven programming?
Date: 2007-09-12 16:52:51
Message-ID: 162867790709120952p5cb6422i25413e85fb9d098e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2007/9/12, Jay Dickon Glanville <dickon(dot)glanville(at)gmail(dot)com>:
> Hello all.
>
> Is it possible for PostgreSQL to notify me of a successful transaction commit?
>
> Here's an example of what I'm thinking of:
> - I write a function (it doesn't matter what language it's in:
> PL/pgSQL, PL/Java, etc)
> - I register that function as a "post-commit" callback function
> - when a client commits a transaction, the function gets called, and
> the database passes the function some general information as to the
> content of the transaction
>
> Note how similar this process is to writing triggers. The only
> problem I have with triggers is that events get generated per-table.
> I'd like to get notifications based on transactions, not table
> changes.
>
> What I'd like to be able to do with this event is to notify any
> applications of this change, so they can update their cached view of
> the database.
>
> So, is this possible? Or am I wishing for the sky? ;-)
>
> Thanks for any help you can provide.
>
> JDG
>
>
On stored procedure level you can use dbms_alert functionality from
orafce library.

http://www.pgsql.cz/index.php/Oracle_functionality_%28en%29#DBMS_ALERT

Pavel Stehule

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Erik Jones 2007-09-12 17:00:29 Re: Event-driven programming?
Previous Message Richard Broersma Jr 2007-09-12 16:51:03 Re: Event-driven programming?