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

From: "amy cheng" <amycq(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Is there some type of Daemon that can look at pgsql?
Date: 1999-09-29 13:19:45
Message-ID: 19990929201945.11006.qmail@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


kind of weird. why polling? where comes from the picture? Seems to
me the picture-uploading process should do those. Or, -- if that
uploading process is somebody else's business, you should
get a trigger within the db: wirte it in C (with in turn, you can
use system() and call a perl program) (and then call it in PL/pgSQL). --
note that seems that PL/pgSQL can not be used to
handle OS directly.

amy

From: Adriaan Joubert <a(dot)joubert(at)albourne(dot)com>
To: Shawn Pursley <shawn(dot)pursley(at)acorncomputers(dot)com>
CC: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Is there some type of Daemon that can look at pgsql?
Date: Wed, 29 Sep 1999 08:20:58 +0300

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

************

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

Browse pgsql-general by date

  From Date Subject
Next Message Sean W. Ellis 1999-09-29 13:21:13 Re: [GENERAL] Is there some type of Daemon that can look at pgsql?
Previous Message amy cheng 1999-09-29 13:13:27 Re: [GENERAL] Anyone doing a native NT port?