On Fri, 30 Jul 2021 at 08:26, Dean Rasheed wrote:
>
> SELECT to_char(1.2e-1002, '9.9'); -- fails
> ERROR: division by zero
>
> I think the simplest
> solution is to just introduce a new local function, as in the attached
> patch. This directly constructs 10^n, for integer n, which is pretty
>
While testing the numeric_power() patch in [1], I found this problem
trying to use to_char() to format very small numbers:
SELECT to_char(1.2e-1001, '9.9'); -- OK
to_char
1.2e-1001
SELECT to_char(1.2e-1002, '9.9'); -- fails
ERROR: division by zero
It turns out that the