Re: Timestamp to time_t

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Andrew Gierth" <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Cc: <pgsql-hackers(at)postgresql(dot)org>, "Scott Mohekey" <scott(dot)mohekey(at)telogis(dot)com>
Subject: Re: Timestamp to time_t
Date: 2009-09-15 19:06:07
Message-ID: 4AAF9F4F020000250002AFF7@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> wrote:

> (To me, the fact that the spec's idea of 2009-01-31 + 1 month
> corresponds to a value that current_date will never be equal to is
> a far greater show-stopper.)

You get to pick which way you want to normalize that to the calendar
-- 31 days past the start of the next month, or pulled back to the
last day of the next month which is not greater than 31. The latter
is more common, but I've seen both practices in real world business
applications.

-Kevin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2009-09-15 19:18:46 Re: WIP: generalized index constraints
Previous Message Jeff Davis 2009-09-15 19:05:11 dropping partitions and concurrent reads