BUG #1517: SQL interval syntax is accepted by the parser, but the interpretation is bogus - Mailing list pgsql-bugs

From Roy Badami
Subject BUG #1517: SQL interval syntax is accepted by the parser, but the interpretation is bogus
Date
Msg-id 20050302215619.7C2FDF1392@svr2.postgresql.org
Whole thread Raw
Responses Re: BUG #1517: SQL interval syntax is accepted by the parser,  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      1517
Logged by:          Roy Badami
Email address:      roy@gnomon.org.uk
PostgreSQL version: 8.0.1
Operating system:   Solaris 9
Description:        SQL interval syntax is accepted by the parser, but the
interpretation is bogus
Details:

The parser accepts SQL interval syntax, but then silently ignores it,
treating it as a zero interval.

radius=# select date '2005-01-01' + interval '1' month;
      ?column?
---------------------
 2005-01-01 00:00:00
(1 row)

radius=# select timestamp '2005-01-1 00:00:00' + interval '1' minute;
      ?column?
---------------------
 2005-01-01 00:00:00
(1 row)

radius=#

pgsql-bugs by date:

Previous
From: "Peter Newman"
Date:
Subject: BUG #1514: Inheritance and Primary Keys
Next
From: "Roy Badami"
Date:
Subject: BUG #1518: Conversions to (undocumented) SQL year-month and day-time interval types silently discard data