| From: | Mike Rylander <mrylander(at)gmail(dot)com> |
|---|---|
| To: | weigelt(at)metux(dot)de |
| Cc: | pgsql-sql <pgsql-sql(at)postgresql(dot)org> |
| Subject: | Re: detaching triggers |
| Date: | 2005-03-27 16:20:27 |
| Message-ID: | b918cf3d050327082052be653e@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On Sun, 27 Mar 2005 17:41:02 +0200, Enrico Weigelt <weigelt(at)metux(dot)de> wrote:
>
> Hi folks,
>
> is it somehow possible to detach trigger, so the calling transaction
> can return immediately, even before the trigger function has
> returned.
No, but see below.
> The only solution I currently know is to fill somethings in a queue
> table by rule and have an external daemon looking at it every second.
> But this doesnt seem very optimal for me.
Take a look at the LISTEN/NOTIFY interfaces in the docs. This will
allow async post-transaction processing. You can set up an ALSO rule
to notify when a particular type of statement has executed against
your target table.
http://www.postgresql.org/docs/8.0/static/sql-listen.html
http://www.postgresql.org/docs/8.0/static/sql-notify.html
See the bottom of:
http://www.postgresql.org/docs/8.0/static/sql-createrule.html
Hope that helps!
--
Mike Rylander
mrylander(at)gmail(dot)com
GPLS -- PINES Development
Database Developer
http://open-ils.org
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruno Wolff III | 2005-03-27 16:33:28 | Re: Foreign key |
| Previous Message | Tom Lane | 2005-03-27 16:01:42 | Re: Postgre: 8.0.1 Create Table insde a function gives strange error at execution time |