date overflows

Lists: pgsql-bugspgsql-patches
From: Kris Jurka <books(at)ejurka(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: date overflows
Date: 2005-12-04 00:53:23
Message-ID: Pine.BSO.4.61.0512031947460.21763@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-patches


I'm seeing some date input overflows here. I tested on CVS HEAD
without --enable-integer-datetimes and 7.4.9 and 8.0.4 with
--enable-integer-datetimes, so it appears to have been around for a
while:

jurka=# select '111123456-01-01'::date;
date
---------------
5290466-07-05
(1 row)

jurka=# select '14824-01-01 BC'::date;
date
----------------
11744398-01-21
(1 row)


From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: date overflows
Date: 2005-12-04 01:06:01
Message-ID: 20051204010601.GA27879@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-patches

On Sat, Dec 03, 2005 at 07:53:23PM -0500, Kris Jurka wrote:
> I'm seeing some date input overflows here.

Yep, I noticed this a few days ago while looking at another problem.
I probably should have started a new thread.

http://archives.postgresql.org/pgsql-hackers/2005-11/msg01563.php

--
Michael Fuhr


From: Kris Jurka <books(at)ejurka(dot)com>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: pgsql-bugs(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: date overflows
Date: 2005-12-05 08:35:10
Message-ID: Pine.BSO.4.61.0512050334290.9005@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-patches

On Sat, 3 Dec 2005, Michael Fuhr wrote:

> On Sat, Dec 03, 2005 at 07:53:23PM -0500, Kris Jurka wrote:
>> I'm seeing some date input overflows here.
>
> Yep, I noticed this a few days ago while looking at another problem.
> I probably should have started a new thread.
>

This seems to fix it.

Kris Jurka

Attachment Content-Type Size
daterange.patch text/plain 1.5 KB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: Michael Fuhr <mike(at)fuhr(dot)org>, pgsql-bugs(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [PATCHES] date overflows
Date: 2006-02-09 03:41:44
Message-ID: 25867.1139456504@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-patches

Kris Jurka <books(at)ejurka(dot)com> writes:
>> On Sat, Dec 03, 2005 at 07:53:23PM -0500, Kris Jurka wrote:
>>> I'm seeing some date input overflows here.

> This seems to fix it.

Applied as far back as 8.0 (a rather arbitrary cutoff but seemed
reasonable).

regards, tom lane