Why don't we accept exponential format for integers?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Why don't we accept exponential format for integers?
Date: 2010-12-17 19:05:52
Message-ID: 4D0BB490.3030000@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Folks,

Is there any good reason that this works:

postgres=# select ('1e+01'::numeric)::integer
postgres-# ;
int4
------
10

But this doesn't?

postgres=# select '1e+01'::Integer
postgres-# ;
ERROR: invalid input syntax for integer: "1e+01"
LINE 1: select '1e+01'::Integer

... or did we just never implement it?

--
-- Josh Berkus
PostgreSQL Experts Inc.
http://www.pgexperts.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alex Hunsaker 2010-12-17 19:07:11 Re: plperlu problem with utf8
Previous Message Pavel Stehule 2010-12-17 19:05:30 Re: proposal: FOREACH-IN-ARRAY (probably for 9.2?)