Re: Why don't we accept exponential format for integers? - Mailing list pgsql-hackers

From
Subject Re: Why don't we accept exponential format for integers?
Date
Msg-id 816A162DFA20D547AAE6C05FD3CFFAC605BA57DE50@MX06A.corp.emc.com
Whole thread Raw
In response to Re: Why don't we accept exponential format for integers?  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
> > And so does:
> > SELECT 1.23e+01::Integer
> >
> >
> >> > which I find just as dangerous as
> >> > SELECT '1.234e+01'::Integer;
> >
> > Add quotes to either of the other two, and then they don't work either.
> 
> Well, that's stupidly arbitrary.  If we're not going to accept
> '1.234e+01'::Integer, then we shouldn't accept 1.234e+01::Integer either.
> 

Isn't this a case of an explicit cast?  Shouldn't our answer to 1.234e+1::Integer be the same as CAST(1234e+1 AS
Integer)?
Which is legal ISO SQL, as far as I can see.

pgsql-hackers by date:

Previous
From: Marti Raudsepp
Date:
Subject: Re: Why don't we accept exponential format for integers?
Next
From: Josh Berkus
Date:
Subject: Re: Why don't we accept exponential format for integers?