On Tuesday, Dec 2, 2003, at 03:53 US/Pacific, Alexander M. Pravking
wrote:
On Mon, Dec 01, 2003 at 09:09:20PM -0800, Bob Smith wrote:
I'm getting an unexpected result using intervals in an expression:
select ('2003-10-26 0:00:00'::timestamp + '1 day'::interval)::date;
date
2003
Bob Smith <[EMAIL PROTECTED]> writes:
> '1 day' just means '24 hours'
Yup.
> Is this a Postgres bug, or is this correct SQL behavior?
It's arguably a bug, but it's unfixable without a significant change in
the internal representation and handling of intervals. I don't know
when anyone will get
On Mon, Dec 01, 2003 at 09:09:20PM -0800, Bob Smith wrote:
> I'm getting an unexpected result using intervals in an expression:
>
> select ('2003-10-26 0:00:00'::timestamp + '1 day'::interval)::date;
> date
>
> 2003-10-26
> (1 row)
Try using '2003-10-26 0:00:00'::date + 1;
integ
On Tuesday 02 December 2003 05:09, Bob Smith wrote:
> I'm getting an unexpected result using intervals in an expression:
>
> select ('2003-10-26 0:00:00'::timestamp + '1 day'::interval)::date;
> date
>
> 2003-10-26
> I assumed '1 day' would always increment the date by 1, but i
I'm getting an unexpected result using intervals in an expression:
select ('2003-10-26 0:00:00'::timestamp + '1 day'::interval)::date;
date
2003-10-26
(1 row)
When I get rid of the date cast it becomes clear what is happening:
select '2003-10-26 0:00:00'::timestamp + '1 day'::in