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

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Bill Moran <wmoran(at)potentialtech(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Why don't we accept exponential format for integers?
Date: 2010-12-18 00:03:13
Message-ID: AANLkTi=EJ2qoqgcGcQvGcdKk+rrbbeAfGuVcOeVjUZec@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 17, 2010 at 6:49 PM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
> On 12/17/10 3:34 PM, Robert Haas wrote:
>> On Fri, Dec 17, 2010 at 6:09 PM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
>>> Oh, *I* understand the difference.  Any app developer is going to see it
>>> as stupidly arbitrary, though.
>>
>> Speaking as someone who spent 9 years doing app development, I dispute
>> the word "any".
>
> Ok, "lots" then.

Fair enough.

> If it's not a good idea to enable that functionality,
> then it would be nice to come up with some way to make it more clear why
> it's failing.

I guess I'm about to show my arrogance and utter lack of sympathy for
the common man here, but it's hard for me to imagine anyone who has
any experience at all as a programmer seeing the message ERROR:
invalid input syntax for integer: "1e+01" and having NO idea what the
problem could possibly be. I can imagine them thinking, as you said,
that it's stupid and arbitrary, even though I don't agree with that
myself. But I have a hard time imagining someone looking at that
error and not knowing what they need to do to correct it, unless they
don't know the meaning of the word "integer".

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2010-12-18 00:29:54 Re: Why don't we accept exponential format for integers?
Previous Message Josh Berkus 2010-12-17 23:49:00 Re: Why don't we accept exponential format for integers?