mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-26 03:47:18 +02:00
Update additional float4/8 expected-output files.
I forgot that the back branches have more variant files than HEAD :-(. Per buildfarm. Discussion: https://postgr.es/m/15519-4fc785b483201ff1@postgresql.org
This commit is contained in:
parent
e473e1f2b8
commit
3645d31934
@ -257,3 +257,52 @@ SELECT '' AS five, * FROM FLOAT4_TBL;
|
|||||||
| -1.23457e-020
|
| -1.23457e-020
|
||||||
(5 rows)
|
(5 rows)
|
||||||
|
|
||||||
|
-- test edge-case coercions to integer
|
||||||
|
SELECT '32767.4'::float4::int2;
|
||||||
|
int2
|
||||||
|
-------
|
||||||
|
32767
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT '32767.6'::float4::int2;
|
||||||
|
ERROR: smallint out of range
|
||||||
|
SELECT '-32768.4'::float4::int2;
|
||||||
|
int2
|
||||||
|
--------
|
||||||
|
-32768
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT '-32768.6'::float4::int2;
|
||||||
|
ERROR: smallint out of range
|
||||||
|
SELECT '2147483520'::float4::int4;
|
||||||
|
int4
|
||||||
|
------------
|
||||||
|
2147483520
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT '2147483647'::float4::int4;
|
||||||
|
ERROR: integer out of range
|
||||||
|
SELECT '-2147483648.5'::float4::int4;
|
||||||
|
int4
|
||||||
|
-------------
|
||||||
|
-2147483648
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT '-2147483900'::float4::int4;
|
||||||
|
ERROR: integer out of range
|
||||||
|
SELECT '9223369837831520256'::float4::int8;
|
||||||
|
int8
|
||||||
|
---------------------
|
||||||
|
9223369837831520256
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT '9223372036854775807'::float4::int8;
|
||||||
|
ERROR: bigint out of range
|
||||||
|
SELECT '-9223372036854775808.5'::float4::int8;
|
||||||
|
int8
|
||||||
|
----------------------
|
||||||
|
-9223372036854775808
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT '-9223380000000000000'::float4::int8;
|
||||||
|
ERROR: bigint out of range
|
||||||
|
@ -480,6 +480,55 @@ SELECT '' AS five, * FROM FLOAT8_TBL;
|
|||||||
| -1.2345678901234e-200
|
| -1.2345678901234e-200
|
||||||
(5 rows)
|
(5 rows)
|
||||||
|
|
||||||
|
-- test edge-case coercions to integer
|
||||||
|
SELECT '32767.4'::float8::int2;
|
||||||
|
int2
|
||||||
|
-------
|
||||||
|
32767
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT '32767.6'::float8::int2;
|
||||||
|
ERROR: smallint out of range
|
||||||
|
SELECT '-32768.4'::float8::int2;
|
||||||
|
int2
|
||||||
|
--------
|
||||||
|
-32768
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT '-32768.6'::float8::int2;
|
||||||
|
ERROR: smallint out of range
|
||||||
|
SELECT '2147483647.4'::float8::int4;
|
||||||
|
int4
|
||||||
|
------------
|
||||||
|
2147483647
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT '2147483647.6'::float8::int4;
|
||||||
|
ERROR: integer out of range
|
||||||
|
SELECT '-2147483648.4'::float8::int4;
|
||||||
|
int4
|
||||||
|
-------------
|
||||||
|
-2147483648
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT '-2147483648.6'::float8::int4;
|
||||||
|
ERROR: integer out of range
|
||||||
|
SELECT '9223372036854773760'::float8::int8;
|
||||||
|
int8
|
||||||
|
---------------------
|
||||||
|
9223372036854773760
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT '9223372036854775807'::float8::int8;
|
||||||
|
ERROR: bigint out of range
|
||||||
|
SELECT '-9223372036854775808.5'::float8::int8;
|
||||||
|
int8
|
||||||
|
----------------------
|
||||||
|
-9223372036854775808
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT '-9223372036854780000'::float8::int8;
|
||||||
|
ERROR: bigint out of range
|
||||||
-- test exact cases for trigonometric functions in degrees
|
-- test exact cases for trigonometric functions in degrees
|
||||||
SET extra_float_digits = 3;
|
SET extra_float_digits = 3;
|
||||||
SELECT x,
|
SELECT x,
|
||||||
|
@ -478,6 +478,55 @@ SELECT '' AS five, * FROM FLOAT8_TBL;
|
|||||||
| -1.2345678901234e-200
|
| -1.2345678901234e-200
|
||||||
(5 rows)
|
(5 rows)
|
||||||
|
|
||||||
|
-- test edge-case coercions to integer
|
||||||
|
SELECT '32767.4'::float8::int2;
|
||||||
|
int2
|
||||||
|
-------
|
||||||
|
32767
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT '32767.6'::float8::int2;
|
||||||
|
ERROR: smallint out of range
|
||||||
|
SELECT '-32768.4'::float8::int2;
|
||||||
|
int2
|
||||||
|
--------
|
||||||
|
-32768
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT '-32768.6'::float8::int2;
|
||||||
|
ERROR: smallint out of range
|
||||||
|
SELECT '2147483647.4'::float8::int4;
|
||||||
|
int4
|
||||||
|
------------
|
||||||
|
2147483647
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT '2147483647.6'::float8::int4;
|
||||||
|
ERROR: integer out of range
|
||||||
|
SELECT '-2147483648.4'::float8::int4;
|
||||||
|
int4
|
||||||
|
-------------
|
||||||
|
-2147483648
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT '-2147483648.6'::float8::int4;
|
||||||
|
ERROR: integer out of range
|
||||||
|
SELECT '9223372036854773760'::float8::int8;
|
||||||
|
int8
|
||||||
|
---------------------
|
||||||
|
9223372036854773760
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT '9223372036854775807'::float8::int8;
|
||||||
|
ERROR: bigint out of range
|
||||||
|
SELECT '-9223372036854775808.5'::float8::int8;
|
||||||
|
int8
|
||||||
|
----------------------
|
||||||
|
-9223372036854775808
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT '-9223372036854780000'::float8::int8;
|
||||||
|
ERROR: bigint out of range
|
||||||
-- test exact cases for trigonometric functions in degrees
|
-- test exact cases for trigonometric functions in degrees
|
||||||
SET extra_float_digits = 3;
|
SET extra_float_digits = 3;
|
||||||
SELECT x,
|
SELECT x,
|
||||||
|
Loading…
Reference in New Issue
Block a user