Louis-David Mitterrand wrote:
> 
> Hello,
> 
> Approaching completion of an online auction system based on Postgres and
> mod_perl/Apache I yet have to devise a good way of running certain
> maintenance tasks on the DB like closing auctions, notifying winners,
> transferring old records to archive tables, etc.
> 
> What is the usual way of programming such tasks? Write a backend
> function (in pl/sql or C) and call it from a cron job? From a mod_perl
> handler?
> 
> Thanks in advance for any insight, cheers,
> 
> --
> Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.apartia.org


another possible is to use postgres's internal module ability

for instance you could have a  trigger activate a module at a certain
time through postgres that would do any sort of database call and
process.

multiple languages supported 
perl c procedural

look in postgresql src/contrib dir
in there look for a dir named fulltextindex or  fti

its a good example of how to do this sort of thing in c
in perl i dont know what is involved but its sure to be similar
as far as hooking the module up to postgres's function command


i've used the cron job type before
and if you decide on that, id suggest using cursors and break up the
load
on the database especially if you are running db and web server on same
system

Reply via email to