Re: Timestamp to time_t

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>, "Andrew Gierth" <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, "Scott Mohekey" <scott(dot)mohekey(at)telogis(dot)com>
Subject: Re: Timestamp to time_t
Date: 2009-09-15 18:49:30
Message-ID: 4AAF9B6A020000250002AFEB@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> [ shrug... ] We *have* that property, for sane cases such as
> adding and subtracting a fixed number of days.

Adding and subtracting months is very common in business software.
I have seen application bugs related to this many times. I suspect
that such bugs would occur less often with a more abstract date type
and a date normalization strategy for mapping to the calendar than
it does with typical techniques; but it's not something I would
propose that PostgreSQL move toward. (Well, maybe some day as a
pgfoundry project or something, given that such a system could plug
right in, but not as the default date handling -- for compatibility,
if nothing else.)

I was just reacting to the assertion that date abstraction was such
a stupid thing to do that nothing else proposed in a document which
supports it is worth considering. The Turing Award isn't usually
awarded to those proposing complete nonsense.

-Kevin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2009-09-15 19:03:16 Re: WIP: generalized index constraints
Previous Message Tom Lane 2009-09-15 18:49:03 Re: WIP: generalized index constraints