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

Re: timestamp arithmetic (a possible bug?)

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ilir Gashi <I(dot)Gashi(at)city(dot)ac(dot)uk>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: timestamp arithmetic (a possible bug?)
Date: 2004-07-02 14:12:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
On Fri, 2 Jul 2004, Tom Lane wrote:

> Ilir Gashi <I(dot)Gashi(at)city(dot)ac(dot)uk> writes:
> > I saw this behaviour in PostgreSQL 7.2. (Once again, I know this is an old
> > release but I do not have a newer version installed, and I am only using
> > the server for research purposes). If you execute the following statement
> > SELECT (CAST('01.01.2004 10:01:00' AS TIMESTAMP) - CAST('01.01.2004
> > 10:00:00' AS TIMESTAMP)) + CAST('01.01.2004 10:00:00' AS TIMESTAMP);
> (There is a timestamp + interval operator, so you could make it work by
> flipping around the outer addition.)

Should we be providing an interval + timestamp operator as well since it
looks like the spec implies both orderings should work?

In response to


pgsql-bugs by date

Next:From: Tom LaneDate: 2004-07-02 14:27:35
Subject: Re: Possible bug?
Previous:From: Tom LaneDate: 2004-07-02 14:04:57
Subject: Re: Grant Update (Possible bug)?

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