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

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Bill Moran <wmoran(at)potentialtech(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Why don't we accept exponential format for integers?
Date: 2010-12-17 22:05:49
Message-ID: 4D0BDEBD.9010904@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/17/10 12:46 PM, Jeff Janes wrote:
>
> 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.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2010-12-17 22:12:16 Re: proposal : cross-column stats
Previous Message Alvaro Herrera 2010-12-17 21:53:14 Re: ps_status on fastpath