Skip site navigation (1) Skip section navigation (2)

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

From: Roy Badami <roy(at)gnomon(dot)org(dot)uk>
To: Roy Badami <roy(at)gnomon(dot)org(dot)uk>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>,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-20 15:46:50
Message-ID: 16957.39658.901071.438286@giles.gnomon.org.uk (view raw or flat)
Thread:
Lists: 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


In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2005-03-20 17:44:46
Subject: Re: BUG #1517: SQL interval syntax is accepted by the parser,
Previous:From: Roy BadamiDate: 2005-03-20 14:44:15
Subject: Re: BUG #1517: SQL interval syntax is accepted by the parser,

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group