Re: Excute comnands OS from plpgsql

From: Richard Huxton <dev(at)archonet(dot)com>
To: "Edwin Quijada" <listas_quijada(at)hotmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Excute comnands OS from plpgsql
Date: 2003-10-14 17:47:08
Message-ID: 200310141847.08716.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gaetano Mendola 2003-10-14 17:53:48 Re: Question
Previous Message Jeff Eckermann 2003-10-14 17:46:24 Re: PG tools