Bug in 8.1.5: cannot add literal timestamp value and a interval.

From: "j(dot)random(dot)programmer" <javadesigner(at)yahoo(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Bug in 8.1.5: cannot add literal timestamp value and a interval.
Date: 2006-10-20 21:51:52
Message-ID: 20061020215152.33065.qmail@web32005.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi:

This is a regression bug between 8.1.4 and 8.1.5

'2006-10-20 00:00:00' + interval '5' second

With 8.1.4, the following worked fine. However with
8.1.5, this
gives the following error.

test=# select ('2006-10-20 00:00:00' + interval '5'
second) ;
ERROR: invalid input syntax for type interval:
"2006-10-20 00:00:00"

With 8.1.5, the following works:

test=# select (timestamp '2006-10-20 00:00:00' +
interval '5' second);
?column?
---------------------
2006-10-20 00:00:05
(1 row)

As you can see, we have to specify 'timestamp' before
a literal
timestamp value. That's pretty hokey. Is this a bug or
am I
missing something (and if so, why did a literal
timestamp value not
preceded by "timestamp" work fine in earlier versions
of postgres)?

Best regards,
--j

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2006-10-20 22:17:11 Re: Bug in 8.1.5: cannot add literal timestamp value and a interval.
Previous Message Andreas Seltenreich 2006-10-20 19:33:51 Re: backup + restore fails