mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-20 16:13:23 +02:00
We're currently maintaining two outputs for cube regression test. But that appears to be unsuitable, because these outputs are different in out few checks involving scientific notation. So, split checks involving scientific notation into separate test, making contrib/cube easier to maintain. Backpatch to all supported versions in order to make further backpatching easier. Discussion: https://postgr.es/m/CAPpHfdvJgWjxHsJTtT%2Bo1tz3OR8EFHcLQjhp-d3%2BUcmJLh-fQA%40mail.gmail.com Author: Alexander Korotkov Backpatch-through: 9.3
107 lines
1.5 KiB
Plaintext
107 lines
1.5 KiB
Plaintext
---
|
|
--- Testing cube output in scientific notation. This was put into separate
|
|
--- test, because has platform-depending output.
|
|
---
|
|
SELECT '1e27'::cube AS cube;
|
|
cube
|
|
---------
|
|
(1e+27)
|
|
(1 row)
|
|
|
|
SELECT '-1e27'::cube AS cube;
|
|
cube
|
|
----------
|
|
(-1e+27)
|
|
(1 row)
|
|
|
|
SELECT '1.0e27'::cube AS cube;
|
|
cube
|
|
---------
|
|
(1e+27)
|
|
(1 row)
|
|
|
|
SELECT '-1.0e27'::cube AS cube;
|
|
cube
|
|
----------
|
|
(-1e+27)
|
|
(1 row)
|
|
|
|
SELECT '1e+27'::cube AS cube;
|
|
cube
|
|
---------
|
|
(1e+27)
|
|
(1 row)
|
|
|
|
SELECT '-1e+27'::cube AS cube;
|
|
cube
|
|
----------
|
|
(-1e+27)
|
|
(1 row)
|
|
|
|
SELECT '1.0e+27'::cube AS cube;
|
|
cube
|
|
---------
|
|
(1e+27)
|
|
(1 row)
|
|
|
|
SELECT '-1.0e+27'::cube AS cube;
|
|
cube
|
|
----------
|
|
(-1e+27)
|
|
(1 row)
|
|
|
|
SELECT '1e-7'::cube AS cube;
|
|
cube
|
|
---------
|
|
(1e-07)
|
|
(1 row)
|
|
|
|
SELECT '-1e-7'::cube AS cube;
|
|
cube
|
|
----------
|
|
(-1e-07)
|
|
(1 row)
|
|
|
|
SELECT '1.0e-7'::cube AS cube;
|
|
cube
|
|
---------
|
|
(1e-07)
|
|
(1 row)
|
|
|
|
SELECT '-1.0e-7'::cube AS cube;
|
|
cube
|
|
----------
|
|
(-1e-07)
|
|
(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+15)
|
|
(1 row)
|
|
|
|
SELECT '+1234567890123456'::cube AS cube;
|
|
cube
|
|
------------------------
|
|
(1.23456789012346e+15)
|
|
(1 row)
|
|
|
|
SELECT '-1234567890123456'::cube AS cube;
|
|
cube
|
|
-------------------------
|
|
(-1.23456789012346e+15)
|
|
(1 row)
|
|
|