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:37:13
Message-ID: 20040702073330.V65501@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


On Fri, 2 Jul 2004, Tom Lane wrote:

> Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> writes:
> > On Fri, 2 Jul 2004, Tom Lane wrote:
> >> (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?
>
> If you see spec support for it, then yes ... where do you read that
> exactly?

SQL92 (draft) 4.5.3 Operators involving datetimes and intervals (the table
appears to be the same in SQL99 4.7.3)

The list given there is:
datetime - datetime -> interval
datetime +,- interval -> datetime
interval + datetime -> datetime
interval +,- interval -> interval
interval *,/ numeric -> interval
numeric * interval -> interval

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruno Wolff III 2004-07-02 15:11:06 Re: Possible bug?
Previous Message Ilir Gashi 2004-07-02 14:34:20 Re: Grant Update (Possible bug)?