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

From Roy Badami
Subject Re: BUG #1517: SQL interval syntax is accepted by the parser,
Date
Msg-id 16961.61330.163465.369750@giles.gnomon.org.uk
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,
Re: BUG #1517: SQL interval syntax is accepted by the parser,
Re: BUG #1517: SQL interval syntax is accepted by the parser,
List pgsql-bugs
Roy> The 'constraint' (interval type descriptor or whatever it's
    Roy> really called) is mandatory in standard SQL, I think, so
    Roy> there's no ambiguity anyway, unless anyone is using this
    Roy> undocumented syntax at the moment...

Incidentally, this was the ratinale behind my earlier suggestion, that:

 * if the interval type descriptor is absent, parse the interval as a
   traditional postgres interval

 * if the interval type descriptor is present, parse the interval according
   to the standard syntax

I have no objection to allowing things like

   '1 hour 10 minutes' DAY TO SECOND

but I'm just wondering whether the hybrid syntax is an unnecessary
complication.

    -roy

pgsql-bugs by date:

Previous
From: Roy Badami
Date:
Subject: Re: BUG #1517: SQL interval syntax is accepted by the parser,
Next
From: Roy Badami
Date:
Subject: Re: BUG #1517: SQL interval syntax is accepted by the parser,