From: Paul Ramsey Date: Thu, 1 Aug 2019 20:31:12 +0000 (+0000) Subject: Harmonize calls so tests return same results on multiple Pg versions X-Git-Tag: 3.0.0alpha4~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=afb2615d9222c36d38770215dd61619ff5a45550;p=postgis Harmonize calls so tests return same results on multiple Pg versions References #4464 git-svn-id: http://svn.osgeo.org/postgis/trunk@17659 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/regress/core/estimatedextent.sql b/regress/core/estimatedextent.sql index ee1639b9d..efe90121a 100644 --- a/regress/core/estimatedextent.sql +++ b/regress/core/estimatedextent.sql @@ -9,17 +9,17 @@ insert into t(g) values ('LINESTRING(-10 -50, 20 30)'); -- #877.3 select '#877.3', round(st_xmin(e.e)::numeric, 5), round(st_xmax(e.e)::numeric, 5), round(st_ymin(e.e)::numeric, 5), round(st_ymax(e.e)::numeric, 5) -from ( select ST_EstimatedExtent('t','g') as e ) AS e; +from ( select ST_EstimatedExtent('t','g') as e offset 0 ) AS e; -- #877.4 analyze t; select '#877.4', round(st_xmin(e.e)::numeric, 5), round(st_xmax(e.e)::numeric, 5), round(st_ymin(e.e)::numeric, 5), round(st_ymax(e.e)::numeric, 5) -from ( select ST_EstimatedExtent('t','g') as e ) AS e; +from ( select ST_EstimatedExtent('t','g') as e offset 0 ) AS e; -- #877.5 truncate t; -with e as ( select ST_EstimatedExtent('t','g') as e ) +with e as ( select ST_EstimatedExtent('t','g') as e offset 0 ) select '#877.5', round(st_xmin(e.e)::numeric, 5), round(st_xmax(e.e)::numeric, 5), round(st_ymin(e.e)::numeric, 5), round(st_ymax(e.e)::numeric, 5) from e; drop table t; @@ -38,17 +38,17 @@ analyze p; -- #3391.1 select '#3391.1', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2), round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) -from ( select ST_EstimatedExtent('c1','g') as e ) AS e; +from ( select ST_EstimatedExtent('c1','g') as e offset 0 ) AS e; -- #3391.2 select '#3391.2', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2), round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) -from ( select ST_EstimatedExtent('c2','g') as e ) AS e; +from ( select ST_EstimatedExtent('c2','g') as e offset 0 ) AS e; -- #3391.3 select '#3391.3', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2), round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) -from ( select ST_EstimatedExtent('p','g') as e ) AS e; +from ( select ST_EstimatedExtent('p','g') as e offset 0 ) AS e; insert into c1 values ('Point(0 0)'::geometry); insert into c1 values ('Point(1 1)'::geometry); @@ -60,17 +60,17 @@ analyze p; -- #3391.4 select '#3391.4', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2), round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) -from ( select ST_EstimatedExtent('c1','g') as e ) AS e; +from ( select ST_EstimatedExtent('c1','g') as e offset 0 ) AS e; -- #3391.5 select '#3391.5', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2), round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) -from ( select ST_EstimatedExtent('c2','g') as e ) AS e; +from ( select ST_EstimatedExtent('c2','g') as e offset 0 ) AS e; -- #3391.6 select '#3391.6', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2), round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) -from ( select ST_EstimatedExtent('p','g') as e ) AS e; +from ( select ST_EstimatedExtent('p','g') as e offset 0 ) AS e; insert into c2 values ('Point(0 0)'::geometry); insert into c2 values ('Point(-1 -1)'::geometry); @@ -82,17 +82,17 @@ analyze p; -- #3391.7 select '#3391.7', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2), round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) -from ( select ST_EstimatedExtent('c1','g') as e ) AS e; +from ( select ST_EstimatedExtent('c1','g') as e offset 0 ) AS e; -- #3391.8 select '#3391.8', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2), round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) -from ( select ST_EstimatedExtent('c2','g') as e ) AS e; +from ( select ST_EstimatedExtent('c2','g') as e offset 0 ) AS e; -- #3391.9 select '#3391.9', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2), round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) -from ( select ST_EstimatedExtent('p','g') as e ) AS e; +from ( select ST_EstimatedExtent('p','g') as e offset 0 ) AS e; insert into p values ('Point(1 1)'::geometry); insert into p values ('Point(2 2)'::geometry); @@ -104,17 +104,17 @@ analyze p; -- #3391.10 select '#3391.10', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2), round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) -from ( select ST_EstimatedExtent('c1','g') as e ) AS e; +from ( select ST_EstimatedExtent('c1','g') as e offset 0 ) AS e; -- #3391.11 select '#3391.11', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2), round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) -from ( select ST_EstimatedExtent('c2','g') as e ) AS e; +from ( select ST_EstimatedExtent('c2','g') as e offset 0 ) AS e; -- #3391.12 select '#3391.12', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2), round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) -from ( select ST_EstimatedExtent('p','g') as e ) AS e; +from ( select ST_EstimatedExtent('p','g') as e offset 0 ) AS e; -- test calls with 3th parameter @@ -133,22 +133,22 @@ analyze p; -- #3391.13 select '#3391.13', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2), round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) -from ( select ST_EstimatedExtent('public','p','g','t') as e ) AS e; +from ( select ST_EstimatedExtent('public','p','g','t') as e offset 0 ) AS e; -- #3391.14 select '#3391.14', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2), round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) -from ( select ST_EstimatedExtent('public','p','g','f') as e ) AS e; +from ( select ST_EstimatedExtent('public','p','g','f') as e offset 0 ) AS e; -- #3391.15 select '#3391.15', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2), round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) -from (select ST_EstimatedExtent('public','c1','g', 't') as e ) AS e; +from (select ST_EstimatedExtent('public','c1','g', 't') as e offset 0 ) AS e; -- #3391.16 select '#3391.16', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2), round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) -from ( select ST_EstimatedExtent('public','c1','g', 'f') as e ) AS e; +from ( select ST_EstimatedExtent('public','c1','g', 'f') as e offset 0 ) AS e; insert into c1 values ('Point(0 0)'::geometry); insert into c1 values ('Point(1 1)'::geometry); @@ -160,22 +160,22 @@ analyze p; -- #3391.17 select '#3391.17', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2), round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) -from ( select ST_EstimatedExtent('public','p','g','f') as e) AS e; +from ( select ST_EstimatedExtent('public','p','g','f') as e offset 0 ) AS e; -- #3391.18 select '#3391.18', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2), round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) -from ( select ST_EstimatedExtent('public','p','g','t') as e )AS e; +from ( select ST_EstimatedExtent('public','p','g','t') as e offset 0 )AS e; -- #3391.19 select '#3391.19', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2), round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) -from ( select ST_EstimatedExtent('public','c1','g', 'f') as e ) AS e; +from ( select ST_EstimatedExtent('public','c1','g', 'f') as e offset 0 ) AS e; -- #3391.20 select '#3391.20', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2), round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) -from ( select ST_EstimatedExtent('public','c1','g', 't') as e ) AS e; +from ( select ST_EstimatedExtent('public','c1','g', 't') as e offset 0 ) AS e; drop table p cascade; diff --git a/regress/core/estimatedextent_expected b/regress/core/estimatedextent_expected index dcf50b4bb..0cf866bce 100644 --- a/regress/core/estimatedextent_expected +++ b/regress/core/estimatedextent_expected @@ -3,32 +3,17 @@ WARNING: stats for "t.g" do not exist WARNING: stats for "t.g" do not exist #877.2| WARNING: stats for "t.g" do not exist -WARNING: stats for "t.g" do not exist -WARNING: stats for "t.g" do not exist -WARNING: stats for "t.g" do not exist #877.3|||| #877.4|-10.15000|20.15000|-50.40000|30.40000 #877.5|-10.15000|20.15000|-50.40000|30.40000 WARNING: stats for "c1.g" do not exist -WARNING: stats for "c1.g" do not exist -WARNING: stats for "c1.g" do not exist -WARNING: stats for "c1.g" do not exist #3391.1|||| WARNING: stats for "c2.g" do not exist -WARNING: stats for "c2.g" do not exist -WARNING: stats for "c2.g" do not exist -WARNING: stats for "c2.g" do not exist #3391.2|||| WARNING: stats for "p.g" do not exist -WARNING: stats for "p.g" do not exist -WARNING: stats for "p.g" do not exist -WARNING: stats for "p.g" do not exist #3391.3|||| #3391.4|0.00|1.00|0.00|1.00 WARNING: stats for "c2.g" do not exist -WARNING: stats for "c2.g" do not exist -WARNING: stats for "c2.g" do not exist -WARNING: stats for "c2.g" do not exist #3391.5|||| #3391.6|0.00|1.00|0.00|1.00 #3391.7|0.00|1.00|0.00|1.00 @@ -38,30 +23,15 @@ WARNING: stats for "c2.g" do not exist #3391.11|-1.00|0.00|-1.00|0.00 #3391.12|-1.01|2.02|-1.01|2.02 WARNING: stats for "p.g" do not exist -WARNING: stats for "p.g" do not exist -WARNING: stats for "p.g" do not exist -WARNING: stats for "p.g" do not exist #3391.13|||| WARNING: stats for "p.g" do not exist -WARNING: stats for "p.g" do not exist -WARNING: stats for "p.g" do not exist -WARNING: stats for "p.g" do not exist #3391.14|||| WARNING: stats for "c1.g" do not exist -WARNING: stats for "c1.g" do not exist -WARNING: stats for "c1.g" do not exist -WARNING: stats for "c1.g" do not exist #3391.15|||| WARNING: stats for "c1.g" do not exist -WARNING: stats for "c1.g" do not exist -WARNING: stats for "c1.g" do not exist -WARNING: stats for "c1.g" do not exist #3391.16|||| #3391.17|0.00|1.00|0.00|1.00 WARNING: stats for "p.g" do not exist -WARNING: stats for "p.g" do not exist -WARNING: stats for "p.g" do not exist -WARNING: stats for "p.g" do not exist #3391.18|||| #3391.19|0.00|1.00|0.00|1.00 #3391.20|0.00|1.00|0.00|1.00