Re: Date represetation bug. Some dates are incorrectly selected

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: g(dot)pesce(at)hotbrain(dot)it, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Date represetation bug. Some dates are incorrectly selected
Date: 2001-02-27 19:16:48
Message-ID: 7684.983301408@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

pgsql-bugs(at)postgresql(dot)org writes:
> test=> create table pippo (d date);
> CREATE
> test=> insert into pippo values ('22/05/1977');
> INSERT 629024 1
> test=> insert into pippo values ('28/05/1978');
> INSERT 629025 1
> test=> select * from pippo;
> d
> ------------
> 21/05/1977
> 27/05/1978
> (2 rows)
> test=> select * from pippo where d = '22/05/1977';
> d
> ------------
> 21/05/1977
> (1 rows)

Hm. Are these dates daylight-savings-time transition dates in your
timezone? If so, this is probably a known bug that has been fixed
in more recent Postgres releases. (RedHat 6.2 ships with Postgres
6.5.something if I recall correctly. I suggest updating to PG 7.0.3.)

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2001-02-27 19:40:39 Re: create type and backend terminate
Previous Message Peter Eisentraut 2001-02-27 17:19:21 Re: postgresql-7.1beta5 with Heimdal-0.3e