Functions performed on intervals

From: Jimmie Fulton <JFulton(at)ehso(dot)emory(dot)edu>
To: "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org>
Subject: Functions performed on intervals
Date: 2001-07-12 14:59:41
Message-ID: FB93404FB67ED311ABF9009027991188417EBF@www.ehso.emory.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I hope this is not the wrong list for this type of question...

I'm about to start development on a small app to track employee leave and
vacation time. Based on a simple formula, each employee gets x number of
days at the end of each month. x is a function of time-in-service and
employee type: part-time, full-time, and salary. I could just write a view
to display total time accumulated from their start date to current date
(minus leave taken), but what happens when the employee moves from part-time
to full-time? Their entire leave is recalculated with the new formula and
the employee gets some extra time off. The solution I've thought of is to
call a function once a month with cron to update each employee's leave
balance. Is this the proper way to accomplish this task or are there better
methods or approaches to getting the desired effect?

Thanks for any advice you can give,

Jimmie Fulton
Systems Administrator
Emory University School Of Medicine

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Patrik Kudo 2001-07-12 15:16:19 Re: C Functions
Previous Message Wei Weng 2001-07-12 14:30:42 shared memory size