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

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "j(dot)random(dot)programmer" <javadesigner(at)yahoo(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug in 8.1.5: cannot add literal timestamp value and a interval.
Date: 2006-10-20 22:17:11
Message-ID: 18877.1161382631@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"j.random.programmer" <javadesigner(at)yahoo(dot)com> writes:
> This is a regression bug between 8.1.4 and 8.1.5

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

No, I don't think so.  Every PG release back to the beginning of time
will think that is an interval + interval addition.  That's one of the
system's basic heuristics for resolving the type of unmarked string
literals: if it's in a binary operator expression, assume it's the same as
the known type on the other side of the operator.  The only way it would
act differently would be if there was no interval + interval operator,
but one has existed since at least 7.0 (the oldest version I have handy
to check).

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2006-10-21 03:53:24
Subject: Re: BUG #2710: Intermittent hangs on sequence generation
Previous:From: j.random.programmerDate: 2006-10-20 21:51:52
Subject: Bug in 8.1.5: cannot add literal timestamp value and a interval.

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