BUG #1516: DOC BUG: Interval type syntax and interval literal syntax

From: "Roy Badami" <roy(at)gnomon(dot)org(dot)uk>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1516: DOC BUG: Interval type syntax and interval literal syntax
Date: 2005-03-02 21:35:46
Message-ID: 20050302213546.A9F28F1207@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: 1516
Logged by: Roy Badami
Email address: roy(at)gnomon(dot)org(dot)uk
PostgreSQL version: 8.0.1
Operating system: Solaris 9
Description: DOC BUG: Interval type syntax and interval literal
syntax
Details:

Interval types
--------------

8.5 of the manual gives the syntax of the interval type as

interval [ (p) ]

However PostgreSQL seems to support more of the SQL standard syntax than
this... eg the following type is not accepted in CREATE TABLE, but is
clearly stored as distinct from an unadorned interval type, since it is
echoed back unchanged by \d

interval year to month

The complete SQL syntax isn't supported, however, eg the following is
rejected by the parser:

internal month(3)

Interval literals
-----------------

8.5.1.4 of the manual gives the syntax for interval literals as

[(at)] quantity unit [quantity unit...] [direction]

and then comments:

The optional precision p should be between 0 and 6, and defaults to the
precision of the input literal.

But the specified syntax doesn't include a precision p.

Browse pgsql-bugs by date

  From Date Subject
Next Message Roy Badami 2005-03-02 21:56:19 BUG #1517: SQL interval syntax is accepted by the parser, but the interpretation is bogus
Previous Message Tom Lane 2005-03-02 19:59:26 Re: typos in the docu