Re: [SQL] [ADMIN] Is there anyway to... - Mailing list pgsql-general

From
Subject Re: [SQL] [ADMIN] Is there anyway to...
Date
Msg-id 20061109012417.34765.qmail@web33310.mail.mud.yahoo.com
Whole thread Raw
In response to Re: [ADMIN] Is there anyway to...  ("Jim C. Nasby" <jim@nasby.net>)
Responses Re: [SQL] [ADMIN] Is there anyway to...  (Richard Huxton <dev@archonet.com>)
List pgsql-general
> While you could setup a cron job to decrement some
> counter every day, I
> think that's not the best approach. Instead, I'd run
> a query once a day
> that finds all students that are past-due and takes
> some kind of action.
> --
> Jim Nasby
> jim@nasby.net
> EnterpriseDB      http://enterprisedb.com
> 512.569.9461 (cell)
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: don't forget to increase your free space map
> settings

i'm wanting to learn something here so i'm going to
chime in.

the way i read what you are saying is that you'd have
start_date and number_days columns in your table.

each day a query would run and pull the start_date and
numbers_days columns.

the application (or postgresql function) would then
take the current date, subtract starte date and
compare it to number of days.  if it is above that
number, the code will take some sort of action.

is that about it or have i missed something?

tia...




____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail.
http://new.mail.yahoo.com

pgsql-general by date:

Previous
From: Matthew Peter
Date:
Subject: dblink / plpgsql - definition list cheats for record returning functions?
Next
From: "Thomas H."
Date:
Subject: planer picks a bad plan (seq-scan instead of index) when adding an additional join