Laurette Cisneros wrote:
> What is the difference between these two queries? Is this a bug?
>
> select case when current_timestamp < '2002-12-06'::date + 1
> select case when current_timestamp < '2002-12-06'::date + 1::interval
Yes there is a difference:
select '2002-12-06'::date + 1;
?column?
------------
2002-12-07
(1 row)
select '2002-12-06'::date + 1::interval;
?column?
------------------------
2002-12-06 00:00:01+01
(1 row)
As you can see, 1::interval means one second, not one day.
/Oskar