Re: Is there anyway to...

From: louis gonzales <gonzales(at)linuxlouis(dot)net>
To: Glen Parker <glenebob(at)nwlink(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Is there anyway to...
Date: 2006-11-03 03:21:55
Message-ID: 454AB5D3.30006@linuxlouis.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general pgsql-sql

I suppose I'll just concede now :) Thanks for putting up with my
sarcasm and humoring my other ideas. I really wanted to see if there
were any other methods out there and do appreciate everyone's ideas.

Thanks again, CRON it is.

Glen Parker wrote:

> Wes Sheldahl wrote:
>
>> if you did have a cron job run to check, you would probably just have
>> it set a boolean field on expired records or something of that sort,
>> and run it a little after midnight, at the start of each day,
>> assuming durations were always being measured in days.
>
>
> Exactly. You flag when you discover an expired condition, and you
> flag again when the condition is acted upon. Easy. The instructor
> doesn't need to be bothered any more than you choose. You could even
> set a timestamp indicating the last time the instructor was harrassed
> about it, so you can re-harrass on a daily or weekly basis :-)
>
> Now, my example that had the expire query run when the instructor logs
> on was just to illustrate that if you do this right, it doesn't matter
> when the code runs. Personally, I'd have a cron job do it at
> midnight, but whenever it runs, even if it's multiple times a day, the
> outcome should still be correct. That's where your status flags come
> in. Once a record has been expired, there's no reason for your expire
> code to ever look at that record again, right?
>
> -Glen
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend

--
Email: louis(dot)gonzales(at)linuxlouis(dot)net
WebSite: http://www.linuxlouis.net
"Open the pod bay doors HAL!" -2001: A Space Odyssey
"Good morning starshine, the Earth says hello." -Willy Wonka

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tahir Tamba 2006-11-03 04:07:31 psql error
Previous Message Glen Parker 2006-11-03 03:14:55 Re: Is there anyway to...

Browse pgsql-general by date

  From Date Subject
Next Message Bob Pawley 2006-11-03 03:30:25 Geometry
Previous Message Glen Parker 2006-11-03 03:14:55 Re: Is there anyway to...

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2006-11-03 03:50:00 Re: delete and select with IN clause issues
Previous Message Glen Parker 2006-11-03 03:14:55 Re: Is there anyway to...