BUG #1653: Bug in date

From: "Guilherme" <guilherme(dot)silva(at)nexxera(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1653: Bug in date
Date: 2005-05-06 19:37:22
Message-ID: 20050506193722.20DA4F0B03@svr2.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 1653
Logged by: Guilherme
Email address: guilherme(dot)silva(at)nexxera(dot)com
PostgreSQL version: 7.4
Operating system: Linux
Description: Bug in date
Details:

Dear Postgres Support,

I think found a bug in postgres, see the sql:

BILHETAGEM=# select sum(tm_arquivo) from bilhete where
cd_caixa_postal_principal=1304 AND
BILHETAGEM-# dt_transacao >= to_date('01042005000000', 'ddmmyyyyHH24MISS')
AND
BILHETAGEM-# dt_transacao < to_date('02042005000000', 'ddmmyyyyHH24MISS');
sum
-----
968
(1 row)

BILHETAGEM=# select sum(tm_arquivo) from bilhete where
cd_caixa_postal_principal=1304 AND
BILHETAGEM-# dt_transacao >= to_date('01042005000000', 'ddmmyyyyHH24MISS')
AND
BILHETAGEM-# dt_transacao <= to_date('01042005235959', 'ddmmyyyyHH24MISS');
sum
-----

(1 row)

Look the rows number, all the information is on 01/04/2005, but only the
first sql can get the correct results.

I'm brazilian sorry for my bad english.

[]'s

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2005-05-06 20:09:12 Re: BUG #1651: static date field is not recognized automatically when group by is used
Previous Message Villiam Manera 2005-05-06 16:46:20 BUG #1652: pg_restore failed