From: | Jeff Davis <pgsql(at)j-davis(dot)com> |
---|---|
To: | Jean-Christophe Praud <jc(at)praud(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Asynchronous trigger |
Date: | 2006-09-06 22:03:12 |
Message-ID: | 1157580192.20589.127.camel@dogma.v10.wvs |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Wayne Conrad | 2006-09-06 22:21:04 | Child program using parent program's transaction? |
Previous Message | Arturo Perez | 2006-09-06 21:56:28 | Problems with sequences |