From c53ab8a3af46029b72634ec0643e78661b252f62 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 29 Mar 2016 22:23:32 -0400 Subject: [PATCH] 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. --- src/test/regress/expected/timestamptz.out | 8 +------- src/test/regress/sql/timestamptz.sql | 5 +---- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/test/regress/expected/timestamptz.out b/src/test/regress/expected/timestamptz.out index 9627aa3671..67f26db204 100644 --- a/src/test/regress/expected/timestamptz.out +++ b/src/test/regress/expected/timestamptz.out @@ -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 diff --git a/src/test/regress/sql/timestamptz.sql b/src/test/regress/sql/timestamptz.sql index 35470ce7c9..c023095bb8 100644 --- a/src/test/regress/sql/timestamptz.sql +++ b/src/test/regress/sql/timestamptz.sql @@ -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);