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

From: Roy Badami <roy(at)gnomon(dot)org(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Roy Badami <roy(at)gnomon(dot)org(dot)uk>, 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-23 23:48:47
Message-ID: 16962.95.458613.90797@giles.gnomon.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


Tom> Yes. The ISO design for the datatype is pretty brain-dead if
Tom> you ask me --- the basic meaning of a data literal shouldn't
Tom> be so dependent on context.

Arguably it's not, because the interval qualifier is an intrinsic (and
mandatory) part of the literal syntax, so the full ISO interval is
completely unambigous.

Where you run into problems is where you are casting strings to
intervals, in which case the way the string is parsed is (rather
unncessarily) dependent on the exact type of the interval.

This area certainly seems (over) complex, although you can see the
logic behind the design...

-roy

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2005-03-23 23:49:54 Re: BUG #1517: SQL interval syntax is accepted by the parser,
Previous Message Roy Badami 2005-03-23 23:42:36 Re: BUG #1517: SQL interval syntax is accepted by the parser,