Re: timestamp arithmetic (a possible bug?)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
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 16:34:50
Message-ID: 15567.1088786090@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> writes:
>>> 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)

Yeah. It looks like we have most of these, but would need to add
interval + date
interval + timetz
interval + timestamp
interval + timestamptz
and for consistency
integer + date
Curiously, we do have interval + time without time zone ... I guess Tom
Lockhart overlooked these when he was working in the area.

I notice also that date - date yields an integer (ie, number of days)
where I think that strict spec compliance would mandate yielding an
interval instead. I'm uneager to change this though.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2004-07-02 16:52:42 Re: Grant Update (Possible bug)?
Previous Message Tom Lane 2004-07-02 16:05:47 Re: Possible bug?