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

From Joshua D. Drake
Subject Re: Why don't we accept exponential format for integers?
Date
Msg-id 1292617629.28145.22.camel@jd-desktop
Whole thread Raw
In response to Re: Why don't we accept exponential format for integers?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Why don't we accept exponential format for integers?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Why don't we accept exponential format for integers?  (Nathan Boley <npboley@gmail.com>)
List pgsql-hackers
On Fri, 2010-12-17 at 14:35 -0500, Tom Lane wrote:
> Josh Berkus <josh@agliodbs.com> writes:
> > postgres=# select '1e+01'::Integer
> > postgres-# ;
> > ERROR:  invalid input syntax for integer: "1e+01"
> 
> I have never heard of any programming system anywhere that accepts
> such
> a syntax for integers (assuming it distinguishes integers from other
> numbers at all).  I'm not excited about being the first.  Why does
> this
> error surprise you?  It doesn't seem particularly different from
> arguing
> that 1.000 should be considered an integer, which strikes me as a
> seriously bad idea.
> 
Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print int(1e+01)
10
>>> 

Sincerely,

Joshua D. Drake


>                         regards, tom lane 
-- 
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579
Consulting, Training, Support, Custom Development, Engineering
http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Why don't we accept exponential format for integers?
Next
From: Tom Lane
Date:
Subject: Re: Why don't we accept exponential format for integers?