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

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

Bill Moran <wmoran(at)potentialtech(dot)com> writes:
> In response to Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>> 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.

> But
> SELECT 1.000::Integer;
> works. And so does

Sure. That's a datatype conversion, though; it's not a case of taking
the value as an integer natively.

> One of the exciting (but possibly wrong) arguments in favor of this is the
> fact that some programming languages will output integers in exponential
> notation when the numbers are very large (PHP is the only example that
> comes to mind, but it's a pretty common language)

Just another example of the fact that PHP was designed by incompetent
amateurs :-(

http://www.junauza.com/2010/12/top-50-programming-quotes-of-all-time.html

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2010-12-17 20:27:09 Re: Why don't we accept exponential format for integers?
Previous Message Bill Moran 2010-12-17 20:16:29 Re: Why don't we accept exponential format for integers?