diff options
| author | Tom Lane | 2001-01-26 22:50:26 +0000 |
|---|---|---|
| committer | Tom Lane | 2001-01-26 22:50:26 +0000 |
| commit | b78d1bed07d343542a4d295c3113c73a3379ed93 (patch) | |
| tree | 6ea9034397632b7bb2496a51968372fde1a7c1d2 /src/test | |
| parent | 5a832218fd24e659826a8e5ca6cdafbdba1dde4b (diff) | |
Change float8-to-int8 conversion to round to nearest, rather than
truncating to integer. Remove regress test that checks whether
4567890123456789 can be converted to float without loss; since that's
52 bits, it's on the hairy edge of failing with IEEE float8s, and indeed
rint seems to give platform-dependent results for it.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/regress/expected/int8-exp-three-digits.out | 10 | ||||
| -rw-r--r-- | src/test/regress/expected/int8.out | 10 | ||||
| -rw-r--r-- | src/test/regress/sql/int8.sql | 1 |
3 files changed, 0 insertions, 21 deletions
diff --git a/src/test/regress/expected/int8-exp-three-digits.out b/src/test/regress/expected/int8-exp-three-digits.out index 562655bf440..e42d5dfaf2c 100644 --- a/src/test/regress/expected/int8-exp-three-digits.out +++ b/src/test/regress/expected/int8-exp-three-digits.out @@ -87,16 +87,6 @@ SELECT '' AS five, q2, float8(q2) FROM INT8_TBL; | -4567890123456789 | -4.56789012345679e+015 (5 rows) -SELECT '' AS five, q1, int8(float8(q1)) AS "two coercions" FROM INT8_TBL; - five | q1 | two coercions -------+------------------+------------------ - | 123 | 123 - | 123 | 123 - | 4567890123456789 | 4567890123456789 - | 4567890123456789 | 4567890123456789 - | 4567890123456789 | 4567890123456789 -(5 rows) - SELECT '' AS five, 2 * q1 AS "twice int4" FROM INT8_TBL; five | twice int4 ------+------------------ diff --git a/src/test/regress/expected/int8.out b/src/test/regress/expected/int8.out index 30424a3f274..269cd2c0b50 100644 --- a/src/test/regress/expected/int8.out +++ b/src/test/regress/expected/int8.out @@ -87,16 +87,6 @@ SELECT '' AS five, q2, float8(q2) FROM INT8_TBL; | -4567890123456789 | -4.56789012345679e+15 (5 rows) -SELECT '' AS five, q1, int8(float8(q1)) AS "two coercions" FROM INT8_TBL; - five | q1 | two coercions -------+------------------+------------------ - | 123 | 123 - | 123 | 123 - | 4567890123456789 | 4567890123456789 - | 4567890123456789 | 4567890123456789 - | 4567890123456789 | 4567890123456789 -(5 rows) - SELECT '' AS five, 2 * q1 AS "twice int4" FROM INT8_TBL; five | twice int4 ------+------------------ diff --git a/src/test/regress/sql/int8.sql b/src/test/regress/sql/int8.sql index 0014efa220d..b5cb13480be 100644 --- a/src/test/regress/sql/int8.sql +++ b/src/test/regress/sql/int8.sql @@ -22,7 +22,6 @@ SELECT '' AS five, q1, q2, q1 / q2 AS divide FROM INT8_TBL; SELECT '' AS five, q1, float8(q1) FROM INT8_TBL; SELECT '' AS five, q2, float8(q2) FROM INT8_TBL; -SELECT '' AS five, q1, int8(float8(q1)) AS "two coercions" FROM INT8_TBL; SELECT '' AS five, 2 * q1 AS "twice int4" FROM INT8_TBL; SELECT '' AS five, q1 * 2 AS "twice int4" FROM INT8_TBL; |
