Bug in datetime formatting for very large years - Mailing list pgsql-hackers

From Oliver Elphick
Subject Bug in datetime formatting for very large years
Date
Msg-id 200101132227.f0DMR3N06789@linda.lfix.co.uk
Whole thread Raw
List pgsql-hackers
If the year is very large, datetime formatting overflows its limits and
gives very weird results.  Either the formatting needs to be improved
or there should be an upper bound on the year.


bray=# select version();                            version                              
------------------------------------------------------------------PostgreSQL 7.1beta1 on i686-pc-linux-gnu, compiled by
GCC2.95.3
 
(1 row)


bray=#  select 'now'::datetime + '100000y'::interval;     ?column?       
---------------------102001-01-13 22:128
(1 row)

bray=#  select 'now'::datetime + '1000000y'::interval;     ?column?       
---------------------1002001-01-13 22:32
(1 row)
-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
========================================   "Wherefore let him that thinketh he standeth take heed      lest he fall."
        I Corinthians 10:12 
 




pgsql-hackers by date:

Previous
From: Konstantinos Agouros
Date:
Subject: diffs available?
Next
From: selkovjr@mcs.anl.gov
Date:
Subject: Re: Re: AW: Re: GiST for 7.1 !!