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

It could be either in ANSI:

   INTERVAL '1:30' MINUTE TO SECOND
   INTERVAL '1:30' HOUR TO MINUTE

Similarly, pg interprets 

   INTERVAL '1'

as

   INTERVAL '1 second'

In ANSI, it could be any one of

   INTERVAL '1' SECOND
   INTERVAL '1' MINUTE
   INTERVAL '1' HOUR
   INTERVAL '1' DAY
   INTERVAL '1' MONTH
   INTERVAL '1' YEAR

In ANSI you can only parse the string by reference to the interval type.

   -roy

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to