From: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
---|---|
To: | <pgsql-bugs(at)postgresql(dot)org> |
Subject: | FW: postgresql 7.3.2 bug on date '1901-12-13' and '190 1-1 2 (fwd) |
Date: | 2003-08-21 03:00:35 |
Message-ID: | 20030820195852.L27553-100000@megazone.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
I'm forwarding part of the response to a query for information I'd
sent related to this. The interesting thing here I think
is the to_timestamp returns for 1901/12/13 and 1901/12/14.
------
db1=> select cast(timestamptz '1901/12/13' as date);
date
------------
1901-12-13
(1 row)
db1=> select cast(timestamptz '1901/12/14' as date);
date
------------
1901-12-13
(1 row)
db1=> select to_timestamp('1901/12/13', 'YYYY/MM/DD');
to_timestamp
---------------------
1901-12-13 00:00:00
(1 row)
db1=> select to_timestamp('1901/12/14', 'YYYY/MM/DD');
to_timestamp
---------------------
1901-12-13 13:00:00
(1 row)
db1=> select to_date('1901/12/13', 'YYYY/MM/DD');
to_date
------------
1901-12-13
(1 row)
db1=> select to_date('1901/12/14', 'YYYY/MM/DD');
to_date
------------
1901-12-13
(1 row)
db1=>
db1=> select timestamptz '1901/12/14';
timestamptz
---------------------
1901-12-13 13:00:00
(1 row)
db1=> select timestamptz '1901/12/13';
timestamptz
---------------------
1901-12-13 00:00:00
(1 row)
================================================================
-----Original Message-----
From: Stephan Szabo [mailto:sszabo(at)megazone(dot)bigpanda(dot)com]
Sent: Thursday, 21 August 2003 3:53 AM
To: Arnold Mavromatis
Cc: Lan Tran; 'meg(at)bom(dot)gov(dot)au'; 'aam(at)bom(dot)gov(dot)au'
Subject: Re: FW: FW: [BUGS] postgresql 7.3.2 bug on date '1901-12-13' and
'190 1-12
Noone seems to have jumped on this yet, so I figured I'd do a little more
looking. Unfortunately in the end, you may need to do some grotting around
with a debugger. :(
What do
select timestamptz '1901/12/13';
select timestamptz '1901/12/14';
select cast(timestamptz '1901/12/13' as date);
select cast(timestamptz '1901/12/14' as date);
select to_timestamp('1901/12/13', 'YYYY/MM/DD');
select to_timestamp('1901/12/14', 'YYYY/MM/DD');
select to_date('1901/12/13', 'YYYY/MM/DD');
select to_date('1901/12/14', 'YYYY/MM/DD');
give you?
I'd also suggest considering building a 7.3.4 system and seeing if you get
the same odd results from there.
From | Date | Subject | |
---|---|---|---|
Next Message | Arnold Mavromatis | 2003-08-21 05:37:06 | Re: postgresql 7.3.2 bug on date '1901-12-13' and '1901-12 |
Previous Message | Bruno Wolff III | 2003-08-21 02:32:21 | Re: ALTER SCHEMA problem |