Event-driven programming?

Поиск
Список
Период
Сортировка
От Jay Dickon Glanville
Тема Event-driven programming?
Дата
Msg-id 53bada0f0709120936ub76c891y55694e38d5f26f67@mail.gmail.com
обсуждение исходный текст
Ответы Re: Event-driven programming?  (Martijn van Oosterhout <kleptog@svana.org>)
Re: Event-driven programming?  (Richard Broersma Jr <rabroersma@yahoo.com>)
Re: Event-driven programming?  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Re: Event-driven programming?  (Richard Huxton <dev@archonet.com>)
Re: Event-driven programming?  ("Asko Oja" <ascoja@gmail.com>)
Список pgsql-general
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

--
Jay Dickon Glanville

В списке pgsql-general по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: problems with large table
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Event-driven programming?