From: | "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Bug in datetime formatting for very large years |
Date: | 2001-01-13 22:27:01 |
Message-ID: | 200101132227.f0DMR3N06789@linda.lfix.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 GCC 2.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(dot)Elphick(at)lfix(dot)co(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Felipe Diaz Cardona | 2001-01-13 23:16:48 | primary keys |
Previous Message | Barry Stewart | 2001-01-13 18:26:02 | SUCCESS!!: bizarre behavior of 'time' data entry |