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

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

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> o Interpret syntax that isn't uniquely ANSI or PG, like '1:30' or
> '1' as ANSI syntax, e.g. interpret '1:30' MINUTE TO SECOND as
> '1 minute 30 seconds'

> This is going to be a backward compatibility problem, but to support
> ANSI syntax we are going to need to do this.

We should do that *only* when an ISO (not ANSI) interval constraint is
present. So plain INTERVAL '1' would still be read under PG rules.
That would eliminate the backward-compatibility problem pretty well
(since the constraints aren't documented and hence aren't being used
now), while not posing a big problem for ISO cases (since if there's
no constraint there are no ambiguous cases, I believe --- the ISO
syntax would require all fields to be present).

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Roy Badami 2005-03-23 22:33:45 Re: BUG #1517: SQL interval syntax is accepted by the parser,
Previous Message Bruce Momjian 2005-03-23 22:14:14 Re: BUG #1517: SQL interval syntax is accepted by the parser,