mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Make float exponent output on Windows look the same as elsewhere.
Windows, alone among our supported platforms, likes to emit three-digit exponent fields even when two digits would do. Adjust such results to look like the way everyone else does it. Eliminate a bunch of variant expected-output files that were needed only because of this quirk. Discussion: https://postgr.es/m/2934.1539122454@sss.pgh.pa.us
This commit is contained in:
@ -1,106 +0,0 @@
|
||||
---
|
||||
--- Testing cube output in scientific notation. This was put into separate
|
||||
--- test, because has platform-depending output.
|
||||
---
|
||||
SELECT '1e27'::cube AS cube;
|
||||
cube
|
||||
----------
|
||||
(1e+027)
|
||||
(1 row)
|
||||
|
||||
SELECT '-1e27'::cube AS cube;
|
||||
cube
|
||||
-----------
|
||||
(-1e+027)
|
||||
(1 row)
|
||||
|
||||
SELECT '1.0e27'::cube AS cube;
|
||||
cube
|
||||
----------
|
||||
(1e+027)
|
||||
(1 row)
|
||||
|
||||
SELECT '-1.0e27'::cube AS cube;
|
||||
cube
|
||||
-----------
|
||||
(-1e+027)
|
||||
(1 row)
|
||||
|
||||
SELECT '1e+27'::cube AS cube;
|
||||
cube
|
||||
----------
|
||||
(1e+027)
|
||||
(1 row)
|
||||
|
||||
SELECT '-1e+27'::cube AS cube;
|
||||
cube
|
||||
-----------
|
||||
(-1e+027)
|
||||
(1 row)
|
||||
|
||||
SELECT '1.0e+27'::cube AS cube;
|
||||
cube
|
||||
----------
|
||||
(1e+027)
|
||||
(1 row)
|
||||
|
||||
SELECT '-1.0e+27'::cube AS cube;
|
||||
cube
|
||||
-----------
|
||||
(-1e+027)
|
||||
(1 row)
|
||||
|
||||
SELECT '1e-7'::cube AS cube;
|
||||
cube
|
||||
----------
|
||||
(1e-007)
|
||||
(1 row)
|
||||
|
||||
SELECT '-1e-7'::cube AS cube;
|
||||
cube
|
||||
-----------
|
||||
(-1e-007)
|
||||
(1 row)
|
||||
|
||||
SELECT '1.0e-7'::cube AS cube;
|
||||
cube
|
||||
----------
|
||||
(1e-007)
|
||||
(1 row)
|
||||
|
||||
SELECT '-1.0e-7'::cube AS cube;
|
||||
cube
|
||||
-----------
|
||||
(-1e-007)
|
||||
(1 row)
|
||||
|
||||
SELECT '1e-300'::cube AS cube;
|
||||
cube
|
||||
----------
|
||||
(1e-300)
|
||||
(1 row)
|
||||
|
||||
SELECT '-1e-300'::cube AS cube;
|
||||
cube
|
||||
-----------
|
||||
(-1e-300)
|
||||
(1 row)
|
||||
|
||||
SELECT '1234567890123456'::cube AS cube;
|
||||
cube
|
||||
-------------------------
|
||||
(1.23456789012346e+015)
|
||||
(1 row)
|
||||
|
||||
SELECT '+1234567890123456'::cube AS cube;
|
||||
cube
|
||||
-------------------------
|
||||
(1.23456789012346e+015)
|
||||
(1 row)
|
||||
|
||||
SELECT '-1234567890123456'::cube AS cube;
|
||||
cube
|
||||
--------------------------
|
||||
(-1.23456789012346e+015)
|
||||
(1 row)
|
||||
|
Reference in New Issue
Block a user