mirror of
https://github.com/postgres/postgres.git
synced 2025-04-24 10:47:04 +03:00
Adjust new test case for more portability.
Early returns from the buildfarm say that most critters are good with commit cbdb8b4c0, but gaur gives unexpected results with the test case involving a float8 that's one-ULP-less-than-2^63. It appears that that platform's version of rint() rounds that value up to 2^63 instead of leaving it be. This is possibly a bug, and it's also possible that no other platform anybody is using anywhere behaves likewise. Still, the point of the test is not to insist that everybody's rint() behaves exactly the same. Let's use two-ULPs-less-than-2^63 instead, which I've tested to act the same on gaur as on more modern hardware. (This is, more or less, exactly the portability issue I'd feared might arise...) Discussion: https://postgr.es/m/15519-4fc785b483201ff1@postgresql.org
This commit is contained in:
parent
cbdb8b4c01
commit
452b637d4b
@ -511,10 +511,10 @@ SELECT '-2147483648.4'::float8::int4;
|
|||||||
|
|
||||||
SELECT '-2147483648.6'::float8::int4;
|
SELECT '-2147483648.6'::float8::int4;
|
||||||
ERROR: integer out of range
|
ERROR: integer out of range
|
||||||
SELECT '9223372036854774784'::float8::int8;
|
SELECT '9223372036854773760'::float8::int8;
|
||||||
int8
|
int8
|
||||||
---------------------
|
---------------------
|
||||||
9223372036854774784
|
9223372036854773760
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT '9223372036854775807'::float8::int8;
|
SELECT '9223372036854775807'::float8::int8;
|
||||||
|
@ -513,10 +513,10 @@ SELECT '-2147483648.4'::float8::int4;
|
|||||||
|
|
||||||
SELECT '-2147483648.6'::float8::int4;
|
SELECT '-2147483648.6'::float8::int4;
|
||||||
ERROR: integer out of range
|
ERROR: integer out of range
|
||||||
SELECT '9223372036854774784'::float8::int8;
|
SELECT '9223372036854773760'::float8::int8;
|
||||||
int8
|
int8
|
||||||
---------------------
|
---------------------
|
||||||
9223372036854774784
|
9223372036854773760
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT '9223372036854775807'::float8::int8;
|
SELECT '9223372036854775807'::float8::int8;
|
||||||
|
@ -183,7 +183,7 @@ SELECT '2147483647.4'::float8::int4;
|
|||||||
SELECT '2147483647.6'::float8::int4;
|
SELECT '2147483647.6'::float8::int4;
|
||||||
SELECT '-2147483648.4'::float8::int4;
|
SELECT '-2147483648.4'::float8::int4;
|
||||||
SELECT '-2147483648.6'::float8::int4;
|
SELECT '-2147483648.6'::float8::int4;
|
||||||
SELECT '9223372036854774784'::float8::int8;
|
SELECT '9223372036854773760'::float8::int8;
|
||||||
SELECT '9223372036854775807'::float8::int8;
|
SELECT '9223372036854775807'::float8::int8;
|
||||||
SELECT '-9223372036854775808.5'::float8::int8;
|
SELECT '-9223372036854775808.5'::float8::int8;
|
||||||
SELECT '-9223372036854780000'::float8::int8;
|
SELECT '-9223372036854780000'::float8::int8;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user