Lists: | pgsql-bugs |
---|
From: | Arnold Mavromatis <A(dot)Mavromatis(at)bom(dot)gov(dot)au> |
---|---|
To: | "'sszabo(at)megazone(dot)bigpanda(dot)com'" <sszabo(at)megazone(dot)bigpanda(dot)com> |
Cc: | "'pgsql-bugs(at)postgresql(dot)org'" <pgsql-bugs(at)postgresql(dot)org>, Lan Tran <L(dot)Tran(at)bom(dot)gov(dot)au>, "'meg(at)bom(dot)gov(dot)au'" <meg(at)bom(dot)gov(dot)au> |
Subject: | FW: postgresql 7.3.2 bug on date '1901-12-13' and '1901-12 -13' |
Date: | 2003-08-20 06:11:04 |
Message-ID: | C5F387003C39D411829E00D0B7496139E2820C@jetstream.ho.bom.gov.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
Hi
A test of recommended selects is as follows..
db1=> select * from sfc_days2;
stn_num | lsd | max_air_temp
---------+------------+--------------
86071 | 1901-12-13 | 3.0
(1 row)
db1=> select * from sfc_days2 where lsd = to_date('1901-12-13',
'YYYY-MM-DD');
stn_num | lsd | max_air_temp
---------+------------+--------------
86071 | 1901-12-13 | 3.0
(1 row)
db1=> select * from sfc_days2 where lsd = to_date('1901-12-14',
'YYYY-MM-DD');
stn_num | lsd | max_air_temp
---------+------------+--------------
86071 | 1901-12-13 | 3.0
(1 row)
As for compiler options I believe everything was left as default for HP-UX
11.11 (Ie the options that you have recommended I do not know if they were
set...) without further investigation...
Will try and investigate and let you know...
Thanks in advance...
Cheers
Arn
-----Original Message-----
From: Stephan Szabo [mailto:sszabo(at)megazone(dot)bigpanda(dot)com]
Sent: Wednesday, August 20, 2003 4:08 PM
To: Arnold Mavromatis
Cc: pgsql-bugs(at)postgresql(dot)org; Lan Tran
Subject: Re: [BUGS] postgresql 7.3.2 bug on date '1901-12-13' and
'1901-12-13'
On Wed, 20 Aug 2003, Arnold Mavromatis wrote:
> PostgreSQL info
> Server version PostgreSQL 7.3.2 on hppa2.0w-hp-hpux11.11
> Engine Version 7.3.2
> Compiled by GCC 3.2.1
I couldn't duplicate on Redhat9 using 7.3.4 or 7.4 beta.
What does a plain select to_date('1901-12-13', 'YYYY-MM-DD')
and select to_date('1901-12-14', 'YYYY-MM-DD') give you?
And did you give --enable-integer-datetimes to configure, and
what compilation options were used on the files (specifically was
-O2 used or a higher level, was -ffast-math used, etc...)?
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
From: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
---|---|
To: | Arnold Mavromatis <A(dot)Mavromatis(at)bom(dot)gov(dot)au> |
Cc: | "'pgsql-bugs(at)postgresql(dot)org'" <pgsql-bugs(at)postgresql(dot)org>, Lan Tran <L(dot)Tran(at)bom(dot)gov(dot)au>, "'meg(at)bom(dot)gov(dot)au'" <meg(at)bom(dot)gov(dot)au> |
Subject: | Re: FW: postgresql 7.3.2 bug on date '1901-12-13' and '1901-12 |
Date: | 2003-08-20 06:38:23 |
Message-ID: | 20030819232729.P91704-100000@megazone.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
On Wed, 20 Aug 2003, Arnold Mavromatis wrote:
> db1=> select * from sfc_days2 where lsd = to_date('1901-12-13',
> 'YYYY-MM-DD');
> stn_num | lsd | max_air_temp
> ---------+------------+--------------
> 86071 | 1901-12-13 | 3.0
> (1 row)
>
> db1=> select * from sfc_days2 where lsd = to_date('1901-12-14',
> 'YYYY-MM-DD');
> stn_num | lsd | max_air_temp
> ---------+------------+--------------
> 86071 | 1901-12-13 | 3.0
> (1 row)
I don't have a particularly good idea of why that would be happening, but
does select (date '1901/12/13' = date '1901/12/14'); return true for you
(attempting to see if you get the same results from a different method
of getting the date fields).
And what does select timestamp '1901/12/13' + interval '1 day'; give you?
> As for compiler options I believe everything was left as default for HP-UX
> 11.11 (Ie the options that you have recommended I do not know if they were
> set...) without further investigation...
Actually it looks like the option I was remembering that broke some of the
datetime functionality is at least checked for explicitly in 7.3.4 and
gives a compile time error.