BUG #1517: SQL interval syntax is accepted by the parser, but the interpretation is bogus

From: "Roy Badami" <roy(at)gnomon(dot)org(dot)uk>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1517: SQL interval syntax is accepted by the parser, but the interpretation is bogus
Date: 2005-03-02 21:56:19
Message-ID: 20050302215619.7C2FDF1392@svr2.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 1517
Logged by: Roy Badami
Email address: roy(at)gnomon(dot)org(dot)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=#

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Roy Badami 2005-03-02 22:22:15 BUG #1518: Conversions to (undocumented) SQL year-month and day-time interval types silently discard data
Previous Message Roy Badami 2005-03-02 21:35:46 BUG #1516: DOC BUG: Interval type syntax and interval literal syntax