Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group