Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 1f99d08

Browse files
committed
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
1 parent 93eec12 commit 1f99d08

File tree

3 files changed

+147
-0
lines changed

3 files changed

+147
-0
lines changed

src/test/regress/expected/float4-exp-three-digits.out

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,3 +257,52 @@ SELECT '' AS five, * FROM FLOAT4_TBL;
257257
| -1.23457e-020
258258
(5 rows)
259259

260+
-- test edge-case coercions to integer
261+
SELECT '32767.4'::float4::int2;
262+
int2
263+
-------
264+
32767
265+
(1 row)
266+
267+
SELECT '32767.6'::float4::int2;
268+
ERROR: smallint out of range
269+
SELECT '-32768.4'::float4::int2;
270+
int2
271+
--------
272+
-32768
273+
(1 row)
274+
275+
SELECT '-32768.6'::float4::int2;
276+
ERROR: smallint out of range
277+
SELECT '2147483520'::float4::int4;
278+
int4
279+
------------
280+
2147483520
281+
(1 row)
282+
283+
SELECT '2147483647'::float4::int4;
284+
ERROR: integer out of range
285+
SELECT '-2147483648.5'::float4::int4;
286+
int4
287+
-------------
288+
-2147483648
289+
(1 row)
290+
291+
SELECT '-2147483900'::float4::int4;
292+
ERROR: integer out of range
293+
SELECT '9223369837831520256'::float4::int8;
294+
int8
295+
---------------------
296+
9223369837831520256
297+
(1 row)
298+
299+
SELECT '9223372036854775807'::float4::int8;
300+
ERROR: bigint out of range
301+
SELECT '-9223372036854775808.5'::float4::int8;
302+
int8
303+
----------------------
304+
-9223372036854775808
305+
(1 row)
306+
307+
SELECT '-9223380000000000000'::float4::int8;
308+
ERROR: bigint out of range

src/test/regress/expected/float8-exp-three-digits-win32.out

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,55 @@ SELECT '' AS five, * FROM FLOAT8_TBL;
444444
| -1.2345678901234e-200
445445
(5 rows)
446446

447+
-- test edge-case coercions to integer
448+
SELECT '32767.4'::float8::int2;
449+
int2
450+
-------
451+
32767
452+
(1 row)
453+
454+
SELECT '32767.6'::float8::int2;
455+
ERROR: smallint out of range
456+
SELECT '-32768.4'::float8::int2;
457+
int2
458+
--------
459+
-32768
460+
(1 row)
461+
462+
SELECT '-32768.6'::float8::int2;
463+
ERROR: smallint out of range
464+
SELECT '2147483647.4'::float8::int4;
465+
int4
466+
------------
467+
2147483647
468+
(1 row)
469+
470+
SELECT '2147483647.6'::float8::int4;
471+
ERROR: integer out of range
472+
SELECT '-2147483648.4'::float8::int4;
473+
int4
474+
-------------
475+
-2147483648
476+
(1 row)
477+
478+
SELECT '-2147483648.6'::float8::int4;
479+
ERROR: integer out of range
480+
SELECT '9223372036854773760'::float8::int8;
481+
int8
482+
---------------------
483+
9223372036854773760
484+
(1 row)
485+
486+
SELECT '9223372036854775807'::float8::int8;
487+
ERROR: bigint out of range
488+
SELECT '-9223372036854775808.5'::float8::int8;
489+
int8
490+
----------------------
491+
-9223372036854775808
492+
(1 row)
493+
494+
SELECT '-9223372036854780000'::float8::int8;
495+
ERROR: bigint out of range
447496
-- test exact cases for trigonometric functions in degrees
448497
SET extra_float_digits = 3;
449498
SELECT x,

src/test/regress/expected/float8-small-is-zero_1.out

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,55 @@ SELECT '' AS five, * FROM FLOAT8_TBL;
442442
| -1.2345678901234e-200
443443
(5 rows)
444444

445+
-- test edge-case coercions to integer
446+
SELECT '32767.4'::float8::int2;
447+
int2
448+
-------
449+
32767
450+
(1 row)
451+
452+
SELECT '32767.6'::float8::int2;
453+
ERROR: smallint out of range
454+
SELECT '-32768.4'::float8::int2;
455+
int2
456+
--------
457+
-32768
458+
(1 row)
459+
460+
SELECT '-32768.6'::float8::int2;
461+
ERROR: smallint out of range
462+
SELECT '2147483647.4'::float8::int4;
463+
int4
464+
------------
465+
2147483647
466+
(1 row)
467+
468+
SELECT '2147483647.6'::float8::int4;
469+
ERROR: integer out of range
470+
SELECT '-2147483648.4'::float8::int4;
471+
int4
472+
-------------
473+
-2147483648
474+
(1 row)
475+
476+
SELECT '-2147483648.6'::float8::int4;
477+
ERROR: integer out of range
478+
SELECT '9223372036854773760'::float8::int8;
479+
int8
480+
---------------------
481+
9223372036854773760
482+
(1 row)
483+
484+
SELECT '9223372036854775807'::float8::int8;
485+
ERROR: bigint out of range
486+
SELECT '-9223372036854775808.5'::float8::int8;
487+
int8
488+
----------------------
489+
-9223372036854775808
490+
(1 row)
491+
492+
SELECT '-9223372036854780000'::float8::int8;
493+
ERROR: bigint out of range
445494
-- test exact cases for trigonometric functions in degrees
446495
SET extra_float_digits = 3;
447496
SELECT x,

0 commit comments

Comments
 (0)