Re: Excute comnands OS from plpgsql - Mailing list pgsql-general

From Richard Huxton
Subject Re: Excute comnands OS from plpgsql
Date
Msg-id 200310141847.08716.dev@archonet.com
Whole thread Raw
In response to Re: Excute comnands OS from plpgsql  (Richard Huxton <dev@archonet.com>)
List pgsql-general
On Tuesday 14 October 2003 17:15, Richard Huxton wrote:
> On Tuesday 14 October 2003 16:38, Edwin Quijada wrote:

> How can I use NOtify to do this?

Please make sure you reply to the list too.

In your daemon you do something like: "LISTEN signal1", and in a trigger (say)
you issue "NOTIFY signal1". Your daemon will receive an asynchronoums message
"signal1" and you can then check the relevant tables for
updates/deletions/whatever signal1 means.

In practice, I usually don't care about responding that quickly, and just have
a cron job start up a script every 5 mins to check a "pending_jobs" table.

--
  Richard Huxton
  Archonet Ltd

pgsql-general by date:

Previous
From: Jeff Eckermann
Date:
Subject: Re: PG tools
Next
From: Network Administrator
Date:
Subject: Re: previous & next buttons