Re: [GENERAL] Is there some type of Daemon that can look at pgsql?
От | amy cheng |
---|---|
Тема | Re: [GENERAL] Is there some type of Daemon that can look at pgsql? |
Дата | |
Msg-id | 19990929201945.11006.qmail@hotmail.com обсуждение исходный текст |
Список | 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.joubert@albourne.com> To: Shawn Pursley <shawn.pursley@acorncomputers.com> CC: pgsql-general@postgreSQL.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
В списке pgsql-general по дате отправления: