Re: [GENERAL] Is there some type of Daemon that can look at pgsql? - Mailing list pgsql-general

From Adriaan Joubert
Subject Re: [GENERAL] Is there some type of Daemon that can look at pgsql?
Date
Msg-id 37F1A1BA.30CE727D@albourne.com
Whole thread Raw
In response to Re: [GENERAL] netmask  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-general
Shawn Pursley wrote:
>
> I'm trying to create a program that would look, at a specified interval of
> every 15 seconds, at a database;  if there is a new entry(which would be
> specified as a field called IMSTAT), it would need to start a process of
> copying a .tif file from a local drive and then create a dynamic HTML page
> from this .tif.  My end users would be passed an URL of this newly created
> page.
>
> After completing the dynamic page, then I would modify the db records to a
> completed status and then the system would again check to see if any new
> entries existed.
>
> Is pgsql the way that you folks would do this or is there a better way/some
> existing daemon that can monitor pgsql?

Do it with perl and use DBI/DBD-Pg or the perl interface that comes with
postgres to talk to the database. That is almost certainly the easiest
way, and you can either launch it from cron (perhaps not the right thing
for something that has got to run every 15 seconds), or turn it into a
daemon with some of the modules in CPAN. If I remember correctly the
Perl cookbook shows how to do most of the bits and pieces you'll need.

Adriaan

pgsql-general by date:

Previous
From: Yury Don
Date:
Subject: Buffer Leak
Next
From: Olivier PRENANT
Date:
Subject: Crypt a column