Re: asynchrous triggers - Mailing list pgsql-sql

From Alvaro Herrera
Subject Re: asynchrous triggers
Date
Msg-id 20050401040741.GA9898@dcc.uchile.cl
Whole thread Raw
In response to asynchrous triggers  (Enrico Weigelt <weigelt@metux.de>)
List pgsql-sql
On Fri, Apr 01, 2005 at 05:52:49AM +0200, Enrico Weigelt wrote:

> is it possible somehow to make (AFTER) triggers run in their
> own process/thread, so the calling session can return immediately
> and the trigger runs in background ?

Not really, though you could signal an external process to do something
asynchronously using LISTEN/NOTIFY.

That is, unless you write your trigger function in C and it calls
fork().  Not sure if that would actually work though (and you should
forget about accessing the database.)

-- 
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"Estoy de acuerdo contigo en que la verdad absoluta no existe...
El problema es que la mentira sí existe y tu estás mintiendo" (G. Lama)


pgsql-sql by date:

Previous
From: Enrico Weigelt
Date:
Subject: asynchrous triggers
Next
From: Gary Stainburn
Date:
Subject: gone blind - can't see syntax error