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

From Tom Lane
Subject Re: Why don't we accept exponential format for integers?
Date
Msg-id 4340.1292614518@sss.pgh.pa.us
Whole thread Raw
In response to Why don't we accept exponential format for integers?  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Why don't we accept exponential format for integers?  (Bill Moran <wmoran@potentialtech.com>)
Re: Why don't we accept exponential format for integers?  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-hackers
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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: unlogged tables vs. GIST
Next
From: Alvaro Herrera
Date:
Subject: Re: ps_status on fastpath