date overflows

Started by Kris Jurkaover 20 years ago4 messagesbugs
Jump to latest
#1Kris Jurka
books@ejurka.com

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)

#2Michael Fuhr
mike@fuhr.org
In reply to: Kris Jurka (#1)
Re: date overflows

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

#3Kris Jurka
books@ejurka.com
In reply to: Michael Fuhr (#2)
Re: date overflows

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

Attachments:

daterange.patchtext/plain; charset=US-ASCII; name=daterange.patchDownload+7-2
#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Kris Jurka (#3)
Re: [PATCHES] date overflows

Kris Jurka <books@ejurka.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