[postgis-tickets] r14480 - Move ST_EstimatedExtent tests in their own file

Sandro Santilli strk at keybit.net
Thu Dec 10 02:15:14 PST 2015


Author: strk
Date: 2015-12-10 02:15:14 -0800 (Thu, 10 Dec 2015)
New Revision: 14480

Added:
   trunk/regress/estimatedextent.sql
   trunk/regress/estimatedextent_expected
Modified:
   trunk/regress/Makefile.in
   trunk/regress/tickets.sql
   trunk/regress/tickets_expected
Log:
Move ST_EstimatedExtent tests in their own file

Modified: trunk/regress/Makefile.in
===================================================================
--- trunk/regress/Makefile.in	2015-12-08 06:05:15 UTC (rev 14479)
+++ trunk/regress/Makefile.in	2015-12-10 10:15:14 UTC (rev 14480)
@@ -84,6 +84,7 @@
 	dump \
 	dumppoints \
 	empty \
+	estimatedextent \
 	forcecurve \
 	geography \
 	in_geohash \

Added: trunk/regress/estimatedextent.sql
===================================================================
--- trunk/regress/estimatedextent.sql	                        (rev 0)
+++ trunk/regress/estimatedextent.sql	2015-12-10 10:15:14 UTC (rev 14480)
@@ -0,0 +1,29 @@
+-- #877, #818
+create table t(g geometry);
+select '#877.1', ST_EstimatedExtent('t','g');
+analyze t;
+select '#877.2', ST_EstimatedExtent('public', 't','g');
+SET client_min_messages TO DEBUG;
+select '#877.2.deprecated', ST_Estimated_Extent('public', 't','g');
+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;
+
+-- #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;
+
+-- #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;
+drop table t;
+
+

Added: trunk/regress/estimatedextent_expected
===================================================================
--- trunk/regress/estimatedextent_expected	                        (rev 0)
+++ trunk/regress/estimatedextent_expected	2015-12-10 10:15:14 UTC (rev 14480)
@@ -0,0 +1,7 @@
+ERROR:  stats for "t.g" do not exist
+ERROR:  stats for "t.g" do not exist
+WARNING:  ST_Estimated_Extent signature was deprecated in 2.1.0. Please use ST_EstimatedExtent
+ERROR:  stats for "t.g" do not exist
+ERROR:  stats for "t.g" do not exist
+#877.4|-10.15000|20.15000|-50.40000|30.40000
+#877.5|-10.15000|20.15000|-50.40000|30.40000

Modified: trunk/regress/tickets.sql
===================================================================
--- trunk/regress/tickets.sql	2015-12-08 06:05:15 UTC (rev 14479)
+++ trunk/regress/tickets.sql	2015-12-10 10:15:14 UTC (rev 14480)
@@ -449,34 +449,6 @@
 WITH p AS ( SELECT 'MULTIPOINT((832694.188 816254.625))'::geometry as g ) 
 SELECT '#1273.1', st_equals(p.g, postgis_dropbbox(p.g)) from p;
 
--- #877, #818
-create table t(g geometry);
-select '#877.1', ST_EstimatedExtent('t','g');
-analyze t;
-select '#877.2', ST_EstimatedExtent('public', 't','g');
-SET client_min_messages TO DEBUG;
-select '#877.2.deprecated', ST_Estimated_Extent('public', 't','g');
-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;
-
--- #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;
-
--- #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;
-drop table t;
-
 -- #1292
 SELECT '#1292', ST_AsText(ST_SnapToGrid(ST_GeomFromText(
 	'GEOMETRYCOLLECTION(POINT(180 90),POLYGON((140 50,150 50,180 50,140 50),(140 60,150 60,180 60,140 60)))'

Modified: trunk/regress/tickets_expected
===================================================================
--- trunk/regress/tickets_expected	2015-12-08 06:05:15 UTC (rev 14479)
+++ trunk/regress/tickets_expected	2015-12-10 10:15:14 UTC (rev 14480)
@@ -144,13 +144,6 @@
 #1060|FFFFFFFF2
 #1273|t
 #1273.1|t
-ERROR:  stats for "t.g" do not exist
-ERROR:  stats for "t.g" do not exist
-WARNING:  ST_Estimated_Extent signature was deprecated in 2.1.0. Please use ST_EstimatedExtent
-ERROR:  stats for "t.g" do not exist
-ERROR:  stats for "t.g" do not exist
-#877.4|-10.15000|20.15000|-50.40000|30.40000
-#877.5|-10.15000|20.15000|-50.40000|30.40000
 #1292|GEOMETRYCOLLECTION(POINT(180 90),POLYGON((140 50,150 50,180 50,140 50),(140 60,150 60,180 60,140 60)))
 NOTICE:  Coordinate values were coerced into range [-180 -90, 180 90] for GEOGRAPHY
 NOTICE:  Coordinate values were coerced into range [-180 -90, 180 90] for GEOGRAPHY



More information about the postgis-tickets mailing list