On Wed, Apr 25, 2012 at 12:51 AM, rihad <rihad@xxxxxxx> wrote: > As PostgreSQL stores timestamps with a fractional part, does it mean that > WHERE f BETWEEN '2012-04-23 00:00:00' AND '2012'04-23 23:59:59' might miss > records with values of f equal to 23:59:59.1234 or so? I think so. I would recommend either using inclusive-exclusive ranges (eg WHERE f >= '2012-04-23' AND f < '2012-04-24'), or casting to date (eg WHERE date(f)='2012-04-23'). (Untested code, might have syntax wrong a bit) ChrisA -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general