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

From Bruce Momjian
Subject Re: BUG #1517: SQL interval syntax is accepted by the parser,
Date
Msg-id 200503232031.j2NKV9p06238@candle.pha.pa.us
Whole thread Raw
In response to Re: BUG #1517: SQL interval syntax is accepted by the parser,  (Roy Badami <roy@gnomon.org.uk>)
Responses Re: BUG #1517: SQL interval syntax is accepted by the parser,
List pgsql-bugs
Roy Badami wrote:
>
>     Bruce>     * Interpret INTERVAL '1:30' MINUTE TO SECOND as '1
>     Bruce> minute 30 seconds'
>
> This seems redundant; it's just another example of the ANSI day-time
> interval syntax...

The reason I added it is that usually people think of the PG syntax as
'1 hour 30 seconds'.  The '1:30' is a kind of subtle because both PG and
ANSI support that syntax and we need to handle that.  The tricky part is
that we can't say by looking at '1:30' whether it is PG or ANSI, and
that will affect how we deal with the clause after it.

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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1552: massive performance hit between 7.4 and 8.0.1
Next
From: Roy Badami
Date:
Subject: Re: BUG #1517: SQL interval syntax is accepted by the parser,