Re: Asynchronous queries - processing listen (notify) in a procedural language
От | Tom Lane |
---|---|
Тема | Re: Asynchronous queries - processing listen (notify) in a procedural language |
Дата | |
Msg-id | 3347.1266805351@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Asynchronous queries - processing listen (notify) in a procedural language (Merlin Moncure <mmoncure@gmail.com>) |
Ответы |
Re: Asynchronous queries - processing listen (notify) in a
procedural language
|
Список | pgsql-general |
Merlin Moncure <mmoncure@gmail.com> writes: > On Sat, Feb 20, 2010 at 9:38 PM, Petr Chmelar <chmelarp@fit.vutbr.cz> wrote: >> Is there a way how to listen and trigger the notify messages in the >> database (+-)immediately and/or to execute additional (trigger) queries >> in other transactions? > The only way that I know of to send notify 'in-transaction' is via > dblink...you just send 'notify x' as the query which commits and fires > the action. It doesn't make sense to do this if your outer > transaction is very short in duration. It's not clear that it makes sense to do that in a long transaction, either. What are you notifying other sessions *about*? Not your own changes --- they won't be able to see those till you commit. There's a reason why NOTIFY is delayed till commit ... regards, tom lane
В списке pgsql-general по дате отправления: