Re: BUG #1517: SQL interval syntax is accepted by the parser, - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #1517: SQL interval syntax is accepted by the parser,
Date
Msg-id 15680.1111620758@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #1517: SQL interval syntax is accepted by the parser,  (Roy Badami <roy@gnomon.org.uk>)
Responses Re: BUG #1517: SQL interval syntax is accepted by the parser,  (Roy Badami <roy@gnomon.org.uk>)
Re: BUG #1517: SQL interval syntax is accepted by the parser,  (Roy Badami <roy@gnomon.org.uk>)
List pgsql-bugs
Roy Badami <roy@gnomon.org.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

pgsql-bugs by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: BUG #1517: SQL interval syntax is accepted by the parser,
Next
From: Roy Badami
Date:
Subject: Re: BUG #1517: SQL interval syntax is accepted by the parser,