Re: Why don't we accept exponential format for integers?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Why don't we accept exponential format for integers?
Date: 2010-12-17 19:35:18
Message-ID: 4340.1292614518@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Josh Berkus <josh(at)agliodbs(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2010-12-17 19:40:22 Re: ps_status on fastpath
Previous Message Robert Haas 2010-12-17 19:33:28 Re: unlogged tables vs. GIST