Re: WIP: to_char, support for EEEE format

From: Euler Taveira de Oliveira <euler(at)timbira(dot)com>
To: Brendan Jurd <direvus(at)gmail(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: to_char, support for EEEE format
Date: 2009-08-03 01:47:52
Message-ID: 4A7641C8.9060506@timbira.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Brendan Jurd escreveu:
> Well, the examples Euler posted in the linked message above were using
> E+308. If I'm reading the Oracle docs correctly, that would have
> triggered Oracle's data type overflow error before even getting to
> to_char(); Oracle's NUMBER type only supports up to E+126. So we
> still don't really know how Oracle handles a (legal) value with too
> many exponent digits for EEEE.
>
As I said in a prior e-mail, Oracle has a diferent overflow limit (-84 to 127).
In PostgreSQL, the numeric datatype can have up to 1000 digits (ie 1e+999) and
the double precision datatype can have up to 309 digits (ie 1e-307 or 1e+308).
We should support up to 3 exponent digits so all of our native datatypes are
covered by the to_char() function.

> Euler, could you post results for a number which fits within Oracle's
> data type but has three exponent digits (like 1E+100)?
>
I don't access to an Oracle Server now but it works fine up to the 127 limit.
And differently to what Pavel proposed, the number of E's is not related to
the number of characters (at least not anymore). So I would like to see the
EEEE being used if we have 2 or 3 exponent digits (that is the same behavior
Oracle has).

--
Euler Taveira de Oliveira
http://www.timbira.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-08-03 01:49:45 Re: CommitFest Status Summary - 2009-08-03
Previous Message Robert Haas 2009-08-03 01:41:04 CommitFest Status Summary - 2009-08-03