]> granicus.if.org Git - postgresql/commitdiff
Remove just-added tests for to_timestamp(float8) with out-of-range inputs.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 30 Mar 2016 02:23:32 +0000 (22:23 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 30 Mar 2016 02:23:32 +0000 (22:23 -0400)
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.

src/test/regress/expected/timestamptz.out
src/test/regress/sql/timestamptz.sql

index 9627aa367157322fa5d2d17d2bb611425f62b52e..67f26db2048e8c25e94ddc15f420e91a04f7105f 100644 (file)
@@ -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 
index 35470ce7c9e3189e508878e386e2a1bb5f00f1d8..c023095bb89b4bf5df74431d0f624020d403ca57 100644 (file)
@@ -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);