]> granicus.if.org Git - postgis/commitdiff
Change tests so that they will have the same behaviour
authorPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 25 Jun 2019 21:51:46 +0000 (21:51 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 25 Jun 2019 21:51:46 +0000 (21:51 +0000)
on both pg11 and pg12

git-svn-id: http://svn.osgeo.org/postgis/branches/2.5@17558 b70326c6-7e19-0410-871a-916f4a2858ee

regress/estimatedextent.sql
regress/estimatedextent_expected
regress/sfcgal/tickets.sql
regress/sfcgal/tickets_expected

index 50f97a115c15bfc9f35bc0faeeb29a8280264515..f47fd403636a6b5880e4c894f9fa45c778f530a0 100644 (file)
@@ -8,21 +8,24 @@ SET client_min_messages TO NOTICE;
 insert into t(g) values ('LINESTRING(-10 -50, 20 30)');
 
 -- #877.3
-with e as ( select ST_EstimatedExtent('t','g') as e )
-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 e;
+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 ) e;
 
 -- #877.4
 analyze t;
-with e as ( select ST_EstimatedExtent('t','g') as e )
-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 e;
+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 ) e;
 
 -- #877.5
 truncate t;
-with e as ( select ST_EstimatedExtent('t','g') as e )
-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;
+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 ( select ST_EstimatedExtent('t','g') as e ) e;
 drop table t;
 
 -- #3391
@@ -37,19 +40,22 @@ analyze c2;
 analyze p;
 
 -- #3391.1
-with e as ( select ST_EstimatedExtent('c1','g') as e )
-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 e;
+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 ) e;
 
 -- #3391.2
-with e as ( select ST_EstimatedExtent('c2','g') as e )
-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 e;
+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 ) e;
 
 -- #3391.3
-with e as ( select ST_EstimatedExtent('p','g') as e )
-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 e;
+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 ) e;
 
 insert into c1 values ('Point(0 0)'::geometry);
 insert into c1 values ('Point(1 1)'::geometry);
@@ -59,19 +65,22 @@ analyze c2;
 analyze p;
 
 -- #3391.4
-with e as ( select ST_EstimatedExtent('c1','g') as e )
-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 e;
+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 ) e;
 
 -- #3391.5
-with e as ( select ST_EstimatedExtent('c2','g') as e )
-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 e;
+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 ) e;
 
 -- #3391.6
-with e as ( select ST_EstimatedExtent('p','g') as e )
-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 e;
+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 ) e;
 
 insert into c2 values ('Point(0 0)'::geometry);
 insert into c2 values ('Point(-1 -1)'::geometry);
@@ -81,19 +90,22 @@ analyze c2;
 analyze p;
 
 -- #3391.7
-with e as ( select ST_EstimatedExtent('c1','g') as e )
-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 e;
+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 ) e;
 
 -- #3391.8
-with e as ( select ST_EstimatedExtent('c2','g') as e )
-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 e;
+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 ) e;
 
 -- #3391.9
-with e as ( select ST_EstimatedExtent('p','g') as e )
-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 e;
+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 )e;
 
 insert into p values ('Point(1 1)'::geometry);
 insert into p values ('Point(2 2)'::geometry);
@@ -103,19 +115,22 @@ analyze c2;
 analyze p;
 
 -- #3391.10
-with e as ( select ST_EstimatedExtent('c1','g') as e )
-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 e;
+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 ) e;
 
 -- #3391.11
-with e as ( select ST_EstimatedExtent('c2','g') as e )
-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 e;
+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 ) e;
 
 -- #3391.12
-with e as ( select ST_EstimatedExtent('p','g') as e )
-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 e;
+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 ) e;
 
 -- test calls with 3th parameter
 
@@ -132,24 +147,28 @@ analyze c2;
 analyze p;
 
 -- #3391.13
-with e as ( select ST_EstimatedExtent('public','p','g','t') as e )
-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 e;
+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 ) e;
 
 -- #3391.14
-with e as ( select ST_EstimatedExtent('public','p','g','f') as e )
-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 e;
+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 ) e;
 
 -- #3391.15
-with e as ( select ST_EstimatedExtent('public','c1','g', 't') as e )
-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 e;
+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 ) e;
 
 -- #3391.16
-with e as ( select ST_EstimatedExtent('public','c1','g', 'f') as e )
-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 e;
+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 ) e;
 
 insert into c1 values ('Point(0 0)'::geometry);
 insert into c1 values ('Point(1 1)'::geometry);
@@ -159,24 +178,28 @@ analyze c2;
 analyze p;
 
 -- #3391.17
-with e as ( select ST_EstimatedExtent('public','p','g','f') as e )
-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 e;
+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 ) e;
 
 -- #3391.18
-with e as ( select ST_EstimatedExtent('public','p','g','t') as e )
-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 e;
+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 ) e;
 
 -- #3391.19
-with e as ( select ST_EstimatedExtent('public','c1','g', 'f') as e )
-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 e;
+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 ) e;
 
 -- #3391.20
-with e as ( select ST_EstimatedExtent('public','c1','g', 't') as e )
-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 e;
+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 ) e;
 
 drop table p cascade;
 
index d353babc910a2c7ee0f1c708fb93b0a61e1f7aa7..9244d121425e0a868884e0b9659eac8edca37f8e 100644 (file)
@@ -6,17 +6,32 @@ WARNING:  ST_Estimated_Extent signature was deprecated in 2.1.0. Please use ST_E
 WARNING:  stats for "t.g" do not exist
 #877.2.deprecated|
 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
@@ -26,15 +41,30 @@ 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
index 7b7439ae391d3ab4a8e5748b4ef3103051b31323..ad63ebdad20f2c45d67caaa6355d96f92b149504 100644 (file)
@@ -462,21 +462,24 @@ select '#877.2.deprecated', ST_Estimated_Extent('public', 't','g');
 insert into t(g) values ('LINESTRING(-10 -50, 20 30)');
 
 -- #877.3
-with e as ( select ST_EstimatedExtent('t','g') as e )
-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 e;
+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 ) e;
 
 -- #877.4
 analyze t;
-with e as ( select ST_EstimatedExtent('t','g') as e )
-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 e;
+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 ) e;
 
 -- #877.5
 truncate t;
-with e as ( select ST_EstimatedExtent('t','g') as e )
-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;
+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 ( select ST_EstimatedExtent('t','g') as e ) e;
 drop table t;
 
 -- #1292
index 6d63faf1d394996e5cd2ad51686d1e51bbb77ca0..9abb82e0705fedf6158f567a9d243ba24e61c5ea 100644 (file)
@@ -95,7 +95,7 @@ NOTICE:  IllegalArgumentException: Invalid number of points in LinearRing found
 #835.11|MULTILINESTRING EMPTY
 #835.12|MULTIPOLYGON EMPTY
 #650|MULTIPOINT(0 0,1 1,2 2)
-#667|SRID=4326;CURVEPOLYGON(CIRCULARSTRING(30 40,-50 39.9999999999999,30 40))
+ERROR:  function postgis_sfcgal_version() does not exist at character 118
 #677|1121395
 #680|01d107000000000000000024c000000000000049400000000000000040
 #681a|
@@ -151,6 +151,9 @@ WARNING:  ST_Estimated_Extent signature was deprecated in 2.1.0. Please use ST_E
 WARNING:  stats for "t.g" do not exist
 #877.2.deprecated|
 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