Tom Lane <t...@sss.pgh.pa.us> writes:

> Chapman Flack <c...@anastigmatix.net> writes:
>> I see there are some tests in src/test/regress:
>> [ that don't work for me ]
>> Is there some special GUC setting in effect during the make check
>> that would be different in my ordinary session? What else could
>> be different? This is making me question my sanity.
>
> Hm, it won't help your sanity to know that those cases pass fine
> for me, interactively, on a couple of different machines:
>
> $ psql postgres
> psql (11devel)
> Type "help" for help.
>
> postgres=#  select 0.12 ^ (-25);
>                  ?column?                  
> -------------------------------------------
>  104825960103961013959336.4983657883169110
> (1 row)
>
> postgres=# select 0.5678 ^ (-85);
>                 ?column?                
> ----------------------------------------
>  782333637740774446257.7719390061997396
> (1 row)
>
> You sure you're using a stock build of Postgres?  No handmade
> versions of operator ^ lying around?

The behaviour seems to have changed in 9.6:

$ psql -p5495
Line style is unicode.
Border style is 2.
psql (10.1, server 9.5.10)
Type "help" for help.

ilmari@[local]:5495 ~=# select 0.12 ^ (-25);
ERROR:  division by zero
ilmari@[local]:5495 ~=# \q

$ psql -p5496
Line style is unicode.
Border style is 2.
psql (10.1, server 9.6.6)
Type "help" for help.

ilmari@[local]:5496 ~=# select 0.12 ^ (-25);
┌───────────────────────────────────────────┐
│                 ?column?                  │
├───────────────────────────────────────────┤
│ 104825960103961013959336.4983657883169110 │
└───────────────────────────────────────────┘
(1 row)

ilmari@[local]:5496 ~=# \q

- ilmari
-- 
"A disappointingly low fraction of the human race is,
 at any given time, on fire." - Stig Sandbeck Mathisen

Reply via email to