Re: WIP: to_char, support for EEEE format - Mailing list pgsql-hackers

From Euler Taveira de Oliveira
Subject Re: WIP: to_char, support for EEEE format
Date
Msg-id 4A7641C8.9060506@timbira.com
Whole thread Raw
In response to Re: WIP: to_char, support for EEEE format  (Brendan Jurd <direvus@gmail.com>)
Responses Re: WIP: to_char, support for EEEE format  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: WIP: to_char, support for EEEE format  (Brendan Jurd <direvus@gmail.com>)
List 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/


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: CommitFest Status Summary - 2009-08-03
Next
From: Tom Lane
Date:
Subject: Re: CommitFest Status Summary - 2009-08-03