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

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

Roy Badami <roy(at)gnomon(dot)org(dot)uk> writes:
> Tom> In particular we have to consider the behavior of the input
> Tom> and output routines for cases like COPY.

> Hmm, but COPY is non-standard, so I'd be happy that it insisted on
> postgres interval syntax.

It's not different from

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

Nothing nonstandard about that that I can see.

> ANSI interval syntax is confusing in this
> context, precisely because there is nowhere to actually put an
> 'interval qualifier' in the literals.

Yes. The ISO design for the datatype is pretty brain-dead if you ask
me --- the basic meaning of a data literal shouldn't be so dependent
on context. Still, it's there, and we should make some effort towards
supporting all but the really awfulest parts of it ;-)

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

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