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 16957.39658.901071.438286@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,
List pgsql-bugs
Roy> It would be

    Roy>    INTERVAL '1 1' DAY TO HOUR

Actually, it would be any one of the following:

   INTERVAL '1 1' DAY TO HOUR
   INTERVAL '1 1:00' DAY TO MINUTE
   INTERVAL '1 1:00:00' DAY TO SECOND
   INTERVAL '25' HOUR
   INTERVAL '25:00' HOUR TO MINUTE
   INTERVAL '25:00:00' HOUR TO SECOND
   INTERVAL '1500' MINUTE
   INTERVAL '1500:00' MINUTE TO SECOND
   INTERVAL '90000' SECOND

all of which are equivalent to the postgres interval

   INTERVAL '1 day 1 hour'

but all of them have (in ANSI SQL) disitinct data types.

At this point you may decide that ANSI intervals are (to put it
politely) somewhat overcomplex... :-)

      -roy

pgsql-bugs by date:

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