Bug in 8.1.5: cannot add literal timestamp value and a interval. - Mailing list pgsql-bugs

From j.random.programmer
Subject Bug in 8.1.5: cannot add literal timestamp value and a interval.
Date
Msg-id 20061020215152.33065.qmail@web32005.mail.mud.yahoo.com
Whole thread Raw
Responses Re: Bug in 8.1.5: cannot add literal timestamp value and a interval.  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-bugs by date:

Previous
From: Andreas Seltenreich
Date:
Subject: Re: backup + restore fails
Next
From: Tom Lane
Date:
Subject: Re: Bug in 8.1.5: cannot add literal timestamp value and a interval.