Re: BUG #1517: SQL interval syntax is accepted by the parser,

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Roy Badami <roy(at)gnomon(dot)org(dot)uk>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1517: SQL interval syntax is accepted by the parser,
Date: 2005-03-19 14:59:37
Message-ID: 200503191459.j2JExbE11317@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Roy Badami wrote:
>
> Tom> No, it shouldn't; read the SQL spec. AFAICS the syntax
> Tom> select interval '1' month is perfectly spec-compliant. The
> Tom> variant select interval '1 month' is *not* per-spec, it is a
> Tom> Postgres-ism.
>
> That is my understanding, though I don't have a copy of the spec (my
> reference is Date & Darwen's "A guide to the SQL standard")

We have links to the spec in the developer's FAQ.

> However, it may be better if the PostgreSQL parser rejected the
> syntax. The current behaviour would seem to be a smoking gun for
> people porting ANSI-compliant SQL applications (assuming such things
> exist :) to PostgreSQL.

So, we have a few major problems with intervals. Let me think a little
and I will summarize.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Roy Badami 2005-03-19 15:07:00 Re: BUG #1517: SQL interval syntax is accepted by the parser,
Previous Message Roy Badami 2005-03-19 14:58:13 Re: BUG #1546: Temp table isn't deleted at the end of a