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: 20040702070659.G64673@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

Responses

Browse pgsql-bugs by date

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