Re: Why don't we accept exponential format for integers?
От | Joshua D. Drake |
---|---|
Тема | Re: Why don't we accept exponential format for integers? |
Дата | |
Msg-id | 1292617629.28145.22.camel@jd-desktop обсуждение исходный текст |
Ответ на | Re: Why don't we accept exponential format for integers? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Why don't we accept exponential format for integers?
Re: Why don't we accept exponential format for integers? |
Список | pgsql-hackers |
On Fri, 2010-12-17 at 14:35 -0500, Tom Lane wrote: > Josh Berkus <josh@agliodbs.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. > Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> print int(1e+01) 10 >>> Sincerely, Joshua D. Drake > regards, tom lane -- PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579 Consulting, Training, Support, Custom Development, Engineering http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt
В списке pgsql-hackers по дате отправления: