Commit c53ab8a3 authored by Tom Lane's avatar Tom Lane

Remove just-added tests for to_timestamp(float8) with out-of-range inputs.

Reporting the specific out-of-range input value produces platform-dependent
results.  We could skip reporting the value, but that's contrary to our
message style guidelines and unhelpful to users.  Or we could add a
separate expected-output file for Windows, but that would be a substantial
maintenance burden, and these test cases seem unlikely to be worth it.

Per buildfarm.
parent c3834ef9
......@@ -2326,19 +2326,13 @@ SELECT to_timestamp(1262349296.7890123); -- 2010-01-01 12:34:56.789012+00
(1 row)
-- edge cases
SELECT to_timestamp(-1e20::float8); -- error, out of range
ERROR: timestamp out of range: "-1e+20"
SELECT to_timestamp(-210866803200.0625); -- error, out of range
ERROR: timestamp out of range: "-2.10867e+11"
SELECT to_timestamp(-210866803200); -- 4714-11-24 00:00:00+00 BC
to_timestamp
---------------------------------
Mon Nov 24 00:00:00 4714 UTC BC
(1 row)
-- The upper boundary differs between integer and float timestamps, so check the biggest one
SELECT to_timestamp(185331707078400::float8); -- error, out of range
ERROR: timestamp out of range: "1.85332e+14"
-- upper limit varies between integer and float timestamps, so hard to test
-- nonfinite values
SELECT to_timestamp(' Infinity'::float);
to_timestamp
......
......@@ -407,11 +407,8 @@ SELECT to_timestamp( 0); -- 1970-01-01 00:00:00+00
SELECT to_timestamp( 946684800); -- 2000-01-01 00:00:00+00
SELECT to_timestamp(1262349296.7890123); -- 2010-01-01 12:34:56.789012+00
-- edge cases
SELECT to_timestamp(-1e20::float8); -- error, out of range
SELECT to_timestamp(-210866803200.0625); -- error, out of range
SELECT to_timestamp(-210866803200); -- 4714-11-24 00:00:00+00 BC
-- The upper boundary differs between integer and float timestamps, so check the biggest one
SELECT to_timestamp(185331707078400::float8); -- error, out of range
-- upper limit varies between integer and float timestamps, so hard to test
-- nonfinite values
SELECT to_timestamp(' Infinity'::float);
SELECT to_timestamp('-Infinity'::float);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment