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:37:13
Message-ID: 20040702073330.V65501@megazone.bigpanda.com (view raw or flat)
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

pgsql-bugs by date

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

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