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

Commit 3645d31

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 e473e1f commit 3645d31

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
@@ -480,6 +480,55 @@ SELECT '' AS five, * FROM FLOAT8_TBL;
480480
| -1.2345678901234e-200
481481
(5 rows)
482482

483+
-- test edge-case coercions to integer
484+
SELECT '32767.4'::float8::int2;
485+
int2
486+
-------
487+
32767
488+
(1 row)
489+
490+
SELECT '32767.6'::float8::int2;
491+
ERROR: smallint out of range
492+
SELECT '-32768.4'::float8::int2;
493+
int2
494+
--------
495+
-32768
496+
(1 row)
497+
498+
SELECT '-32768.6'::float8::int2;
499+
ERROR: smallint out of range
500+
SELECT '2147483647.4'::float8::int4;
501+
int4
502+
------------
503+
2147483647
504+
(1 row)
505+
506+
SELECT '2147483647.6'::float8::int4;
507+
ERROR: integer out of range
508+
SELECT '-2147483648.4'::float8::int4;
509+
int4
510+
-------------
511+
-2147483648
512+
(1 row)
513+
514+
SELECT '-2147483648.6'::float8::int4;
515+
ERROR: integer out of range
516+
SELECT '9223372036854773760'::float8::int8;
517+
int8
518+
---------------------
519+
9223372036854773760
520+
(1 row)
521+
522+
SELECT '9223372036854775807'::float8::int8;
523+
ERROR: bigint out of range
524+
SELECT '-9223372036854775808.5'::float8::int8;
525+
int8
526+
----------------------
527+
-9223372036854775808
528+
(1 row)
529+
530+
SELECT '-9223372036854780000'::float8::int8;
531+
ERROR: bigint out of range
483532
-- test exact cases for trigonometric functions in degrees
484533
SET extra_float_digits = 3;
485534
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
@@ -478,6 +478,55 @@ SELECT '' AS five, * FROM FLOAT8_TBL;
478478
| -1.2345678901234e-200
479479
(5 rows)
480480

481+
-- test edge-case coercions to integer
482+
SELECT '32767.4'::float8::int2;
483+
int2
484+
-------
485+
32767
486+
(1 row)
487+
488+
SELECT '32767.6'::float8::int2;
489+
ERROR: smallint out of range
490+
SELECT '-32768.4'::float8::int2;
491+
int2
492+
--------
493+
-32768
494+
(1 row)
495+
496+
SELECT '-32768.6'::float8::int2;
497+
ERROR: smallint out of range
498+
SELECT '2147483647.4'::float8::int4;
499+
int4
500+
------------
501+
2147483647
502+
(1 row)
503+
504+
SELECT '2147483647.6'::float8::int4;
505+
ERROR: integer out of range
506+
SELECT '-2147483648.4'::float8::int4;
507+
int4
508+
-------------
509+
-2147483648
510+
(1 row)
511+
512+
SELECT '-2147483648.6'::float8::int4;
513+
ERROR: integer out of range
514+
SELECT '9223372036854773760'::float8::int8;
515+
int8
516+
---------------------
517+
9223372036854773760
518+
(1 row)
519+
520+
SELECT '9223372036854775807'::float8::int8;
521+
ERROR: bigint out of range
522+
SELECT '-9223372036854775808.5'::float8::int8;
523+
int8
524+
----------------------
525+
-9223372036854775808
526+
(1 row)
527+
528+
SELECT '-9223372036854780000'::float8::int8;
529+
ERROR: bigint out of range
481530
-- test exact cases for trigonometric functions in degrees
482531
SET extra_float_digits = 3;
483532
SELECT x,

0 commit comments

Comments
 (0)