From: | "Mikko Tiihonen" <mikko(dot)tiihonen(at)iki(dot)fi> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #2768: dates before year 1600 in timestamptz column give strange results |
Date: | 2006-11-19 02:00:58 |
Message-ID: | 200611190200.kAJ20wBh086953@wwwmaster.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 2768
Logged by: Mikko Tiihonen
Email address: mikko(dot)tiihonen(at)iki(dot)fi
PostgreSQL version: 8.1.5
Operating system: Linux/amd64/gcc-4.1.1
Description: dates before year 1600 in timestamptz column give
strange results
Details:
createuser -s -d test
createdb -E LATIN9 -O test test
psql -U test
---
CREATE TEMP TABLE tester (stamp timestamp(6) with time zone);
INSERT INTO tester (stamp) VALUES ( '0134-05-06 09:12:34.123456 +0200' );
INSERT INTO tester (stamp) VALUES ( '2134-05-06 09:12:34.123456 +0200' );
SELECT * FROM tester;
---
PostgreSQL compiled with intdatetime=on
stamp
----------------------------------
0134-05-06 08:52:26.123456+01:39
2134-05-06 09:12:34.123456+02
(2 rows)
PostgreSQL compiled with intdatetime=off
stamp
----------------------------------
0134-05-06 08:52:26.123459+01:39
2134-05-06 09:12:34.123456+02
(2 rows)
If I fetch the rows using v3 protocol with and binary encoding for the
timestamp field I get back has the correct time. If I fetch the rows using
text encoding I get the same erronous value as with psql.
That makes me think the problem is in converting the internal timestamptz
format to formatted text.
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Jones | 2006-11-19 07:33:59 | BUG #2769: "invalid memory alloc request size <n>" on startup |
Previous Message | Steffen Macke | 2006-11-18 07:17:51 | BUG #2767: Bug in avg(interval) |