Re: Temporal Questions

From: Aaron Burt <aaron(at)bavariati(dot)org>
To: pdxpug(at)postgresql(dot)org
Subject: Re: Temporal Questions
Date: 2007-04-30 18:26:00
Message-ID: 20070430182600.GQ17768@syrinxpc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pdxpug

On Mon, Apr 30, 2007 at 09:51:58AM -0700, Rich Shepard wrote:
> I've started a thread on the pgsql-general list that has generated a lot
> of heat but little light. Since most of you work daily with postgres in
> business applications, perhaps you can illuminate the subject.
<snip: table of holidays for calculating
> Are my assumptions about the value of such a table invalid? Do you know of
> any such calendar table in PostgreSQL SQL (rather than the MS SQL or Oracle
> that I find on the Web)?

I can see why that might generate some heat.

PGSQL certainly has functions that can tell you what day of the week or
year it is. As for holidays, which ones apply? I think it'd be
wonderful if someone maintained tables of gov't holidays for the US,
Canada, the EU, Japan, all 50 States and all 13 Territories and
Provinces, not to mention banks, major business and trading entities.

It'd be a lot of work, with little if any compensation, that would
entangle one in plenty of lawsuits over fines and enforcement actions.

There's some discussion of business day calculations about 1/3 down this
page: http://openacs.org/forums/message-view?message_id=25521
(found with http://www.google.com/search?q=postgres+holiday+table )

My own take? Let the customer figure out their own dang holidays; just
make it easy to enter them in. Heck, a bit of Perl tomfoolery could let
one import iCal files. If they screw up, it's Not Your Fault.

In response to

Responses

Browse pdxpug by date

  From Date Subject
Next Message Adam Lowry 2007-05-02 02:53:34 Re: Temporal Questions
Previous Message Rich Shepard 2007-04-30 16:51:58 Temporal Questions