summaryrefslogtreecommitdiff
path: root/src/test/regress/expected/int8.out
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/regress/expected/int8.out')
-rw-r--r--src/test/regress/expected/int8.out20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/regress/expected/int8.out b/src/test/regress/expected/int8.out
index da8be51886..ed0bd34221 100644
--- a/src/test/regress/expected/int8.out
+++ b/src/test/regress/expected/int8.out
@@ -866,3 +866,23 @@ FROM (VALUES (-2.5::float8),
2.5 | 2
(7 rows)
+-- check rounding when casting from numeric
+SELECT x, x::int8 AS int8_value
+FROM (VALUES (-2.5::numeric),
+ (-1.5::numeric),
+ (-0.5::numeric),
+ (0.0::numeric),
+ (0.5::numeric),
+ (1.5::numeric),
+ (2.5::numeric)) t(x);
+ x | int8_value
+------+------------
+ -2.5 | -3
+ -1.5 | -2
+ -0.5 | -1
+ 0.0 | 0
+ 0.5 | 1
+ 1.5 | 2
+ 2.5 | 3
+(7 rows)
+