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:42:36
Message-ID: 16961.65260.219133.672511@giles.gnomon.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Tom> It's not different from

Tom> INSERT INTO foo VALUES('1 year 1 month');

Tom> Nothing nonstandard about that that I can see.

Oh, does ISO allow a cast from a string to an interval? Yes, I think
it probably does. And with the interpretation of the string is
dependent on the ISO interval type, just like for literals? Hmm, yes,
I think it probably does...

That convinces me that you have to figure out what to do with

CAST ('1 year 1 month' AS INTERVAL MONTH)

It _still_ doesn't completely convince me that you need to (or even
want to) support hybrid interval syntax.

Though given you have to support both pg and ISO syntax in the cast, I
guess it becomes more consistent (and less implementation work) to
support both in the literal, too...

I'm concinced, I think. (For the moment :)

-roy

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Roy Badami 2005-03-23 23:48:47 Re: BUG #1517: SQL interval syntax is accepted by the parser,
Previous Message Tom Lane 2005-03-23 23:32:38 Re: BUG #1517: SQL interval syntax is accepted by the parser,