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: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <pgman(at)candle(dot)pha(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-19 20:46:43
Message-ID: 16956.36787.302865.320029@giles.gnomon.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Similary the undocumented postgresism of interpreting

INTERVAL '1:02'

as 1 hour 2 minutes is consistent with the ANSI

INTERVAL '1:02' HOUR TO MINUTE

but not with the ANSI

INTERVAL '1:02' MINUTE TO SECOND

which of course means 1 minute 2 seconds.

The fact is that ANSI interval syntax is very different from postgres
interval syntax. In ANSI interval syntax the literal string can only
be interpreted in the context of the interval type; in postgres
interval syntax the literal string has a well defined meaning in and
of itself, and no interval type is explicitly declared.

So I think I'm back to where I started. Attempting to define
semantics for a hybrid format, where you have an ANSI interval type
but the literal string formatted in postgres interval format is
unnecessarity confusing and complicated.

-roy

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2005-03-19 21:03:22 Re: BUG #1517: SQL interval syntax is accepted by the parser,
Previous Message Roy Badami 2005-03-19 19:26:37 Re: BUG #1517: SQL interval syntax is accepted by the parser,