Re: BUG #5377: group by problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "michel rosa" <mrosa(at)geomatic(dot)ch>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5377: group by problem
Date: 2010-03-18 14:44:23
Message-ID: 10610.1268923463@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"michel rosa" <mrosa(at)geomatic(dot)ch> writes:
> ...
> and upload_date<='2010-03-02'
> give as result
> 2010-03-02 | 0 | 837
> 2010-03-02 | 0.5 | 136
> 2010-03-02 | 1.5 | 138

> but when upload_date<='2010-03-03', I get extras rows for 2010-03-02

Is the upload_date column actually a date? I think maybe it's a
timestamp and the "extra" rows correspond to times after midnight.
Your cutoff conditions are being interpreted as
upload_date<='2010-03-02 00:00:00'
etc.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2010-03-18 15:01:16 Re: BUG #5378: Little inaccuracy in the manual
Previous Message Tom Lane 2010-03-18 14:25:53 Re: text cast to bool bug