Re: Asynchronous trigger
| От | Jeff Davis |
|---|---|
| Тема | Re: Asynchronous trigger |
| Дата | |
| Msg-id | 1157580192.20589.127.camel@dogma.v10.wvs обсуждение исходный текст |
| Ответ на | Asynchronous trigger (Jean-Christophe Praud <jc@praud.com>) |
| Список | pgsql-general |
On Wed, 2006-09-06 at 23:29 +0200, Jean-Christophe Praud wrote:
> Hi all,
>
> I'm planning to convert an application to postgresql 8.1 (from mysql).
> Currently we have some recursive procedures done on the application side
> we would want to rewrite as stored pl/pgsql procedures called by triggers...
>
> Is it possible for these triggers to be asynchronous, in order not to
> block the client application during the recursive process ?
>
You can send the query itself asynchronously using PQsendQuery (for
libpq, see your client library's docs for a similar function). That
allows your application to continue processing, but doesn't allow you to
issue any more queries over that connection.
You could make your trigger send a notification to an application that
just handles that one task in the background.
Regards,
Jeff Davis
В списке pgsql-general по дате отправления: