Received: from localhost (pluto.hub.org [200.46.204.4]) by postgresql.org (Postfix) with ESMTP id CD06B9FB2F0 for ; Thu, 2 Nov 2006 23:22:05 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.4]) (amavisd-new, port 10024) with ESMTP id 99576-02 for ; Thu, 2 Nov 2006 23:21:57 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mx1.linuxlouis.net (mx1.linuxlouis.net [70.88.107.105]) by postgresql.org (Postfix) with ESMTP id 4ECD39FA666 for ; Thu, 2 Nov 2006 23:22:03 -0400 (AST) Received: from [192.168.0.3] (wap.linuxlouis.net [70.88.107.106]) (authenticated bits=0) by mx1.linuxlouis.net (8.13.4/8.13.4) with ESMTP id kA33RAPd031937 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 2 Nov 2006 22:27:10 -0500 Message-ID: <454AB5D3.30006@linuxlouis.net> Date: Thu, 02 Nov 2006 22:21:55 -0500 From: louis gonzales User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Glen Parker CC: pgsql-general@postgresql.org Subject: Re: Is there anyway to... References: <20061102171624.GE21312@localhost> <454A357E.6010409@linuxlouis.net> <454A394C.7020102@zijn-digital.com> <454A3EB6.8080806@linuxlouis.net> <454A40E3.40007@nwlink.com> <26B58EAC-4BCC-470E-AC5E-477A5AA4CA52@themactionfaction.com> <454AB42F.9080406@nwlink.com> In-Reply-To: <454AB42F.9080406@nwlink.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/139 X-Sequence-Number: 103235 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.gonzales@linuxlouis.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