]> granicus.if.org Git - postgis/commitdiff
ST_Estimated_Extent renamed to ST_EstimatedExtent (#1994)
authorSandro Santilli <strk@keybit.net>
Thu, 13 Sep 2012 09:53:02 +0000 (09:53 +0000)
committerSandro Santilli <strk@keybit.net>
Thu, 13 Sep 2012 09:53:02 +0000 (09:53 +0000)
ST_Estimated_Extent is kept but deprecated, testcases test both
signatures. Documentation documents the new name and warns about
it being renamed in 2.1.0

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

NEWS
doc/reference_misc.xml
postgis/postgis.sql.in.c
regress/tickets.sql
regress/tickets_expected

diff --git a/NEWS b/NEWS
index 86b3f04195ce9f6e24e86905a66395db29895c91..3239521f3026174bbd1818fb97a9a0244ee6f87a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,10 @@ PostGIS 2.1.0
   - ST_Intersects(raster, geometry) behaves in the same manner as
     ST_Intersects(geometry, raster).
 
+* Deprecated signatures
+
+  - ST_Estimated_Extent renamed to ST_EstimatedExtent
+
 * New Features *
 
   - ST_Segmentize(geography) (Paul Ramsey / OpenGeo)
index 19a06accaa5a9dd9c7bafea69fb1a77b13689f4d..87a194b22ed698677d59a408d3be8fcb976b8a89 100644 (file)
@@ -166,7 +166,7 @@ all_em|grabone   | grab_rest
 
        <refentry id="ST_Estimated_Extent">
          <refnamediv>
-               <refname>ST_Estimated_Extent</refname>
+               <refname>ST_EstimatedExtent</refname>
 
                <refpurpose>Return the 'estimated' extent of the given spatial table.
                        The estimated is taken from the geometry column's statistics. The
@@ -176,14 +176,14 @@ all_em|grabone   | grab_rest
          <refsynopsisdiv>
                <funcsynopsis>
                  <funcprototype>
-                       <funcdef>box2d <function>ST_Estimated_Extent</function></funcdef>
+                       <funcdef>box2d <function>ST_EstimatedExtent</function></funcdef>
                        <paramdef><type>text </type> <parameter>schema_name</parameter></paramdef>
                        <paramdef><type>text </type> <parameter>table_name</parameter></paramdef>
                        <paramdef><type>text </type> <parameter>geocolumn_name</parameter></paramdef>
                  </funcprototype>
 
                  <funcprototype>
-                       <funcdef>box2d <function>ST_Estimated_Extent</function></funcdef>
+                       <funcdef>box2d <function>ST_EstimatedExtent</function></funcdef>
                        <paramdef><type>text </type> <parameter>table_name</parameter></paramdef>
                        <paramdef><type>text </type> <parameter>geocolumn_name</parameter></paramdef>
                  </funcprototype>
@@ -213,7 +213,8 @@ instead.
                <para>For PostgreSQL&lt;8.0.0 statistics are gathered by
                update_geometry_stats() and resulting extent will be exact.</para>
 
-                <para>Availability: 1.0.0</para>
+    <para>Availability: 1.0.0</para>
+    <para>NOTE: this function was renamed from "ST_Estimated_Extent" in 2.1.0</para>
 
                <para>&curve_support;</para>
          </refsection>
@@ -222,11 +223,11 @@ instead.
          <refsection>
                <title>Examples</title>
 
-               <programlisting>SELECT ST_Estimated_extent('ny', 'edges', 'the_geom');
+               <programlisting>SELECT ST_EstimatedExtent('ny', 'edges', 'the_geom');
 --result--
 BOX(-8877653 4912316,-8010225.5 5589284)
 
-SELECT ST_Estimated_Extent('feature_poly', 'the_geom');
+SELECT ST_EstimatedExtent('feature_poly', 'the_geom');
 --result--
 BOX(-124.659652709961 24.6830825805664,-67.7798080444336 49.0012092590332)
                </programlisting>
index 021ba0572300bc078ea75ebc05db93959f86f332..5494a01edaf1037c76d84b7e91a814983fada36b 100644 (file)
@@ -851,18 +851,30 @@ CREATE OR REPLACE FUNCTION ST_Combine_BBox(box2d,geometry)
 -- ESTIMATED_EXTENT( <schema name>, <table name>, <column name> )
 -----------------------------------------------------------------------
 -- Availability: 1.2.2
+-- Deprecation in 2.1.0 
 CREATE OR REPLACE FUNCTION ST_estimated_extent(text,text,text) RETURNS box2d AS
        'MODULE_PATHNAME', 'geometry_estimated_extent'
        LANGUAGE 'c' IMMUTABLE STRICT SECURITY DEFINER;
 
+-- Availability: 2.1.0
+CREATE OR REPLACE FUNCTION ST_EstimatedExtent(text,text,text) RETURNS box2d AS
+       'MODULE_PATHNAME', 'geometry_estimated_extent'
+       LANGUAGE 'c' IMMUTABLE STRICT SECURITY DEFINER;
+
 -----------------------------------------------------------------------
 -- ESTIMATED_EXTENT( <table name>, <column name> )
 -----------------------------------------------------------------------
 -- Availability: 1.2.2
+-- Deprecation in 2.1.0 
 CREATE OR REPLACE FUNCTION ST_estimated_extent(text,text) RETURNS box2d AS
        'MODULE_PATHNAME', 'geometry_estimated_extent'
        LANGUAGE 'c' IMMUTABLE STRICT SECURITY DEFINER;
 
+-- Availability: 2.1.0
+CREATE OR REPLACE FUNCTION ST_EstimatedExtent(text,text) RETURNS box2d AS
+       'MODULE_PATHNAME', 'geometry_estimated_extent'
+       LANGUAGE 'c' IMMUTABLE STRICT SECURITY DEFINER;
+
 -----------------------------------------------------------------------
 -- FIND_EXTENT( <schema name>, <table name>, <column name> )
 -----------------------------------------------------------------------
index d336267cc3063bf4ef6617b3018468dcc8b3780b..cb9c4ed546d33f5b909cd3d9caaaeea38fac296f 100644 (file)
@@ -449,15 +449,17 @@ SELECT '#1273.1', st_equals(p.g, postgis_dropbbox(p.g)) from p;
 
 -- #877, #818
 create table t(g geometry);
-select '#877.1', st_estimated_extent('t','g');
+select '#877.1', ST_EstimatedExtent('t','g');
 analyze t;
-select '#877.2', st_estimated_extent('public', 't','g');
+select '#877.2', ST_EstimatedExtent('public', 't','g');
+select '#877.2.deprecated', ST_Estimated_Extent('public', 't','g');
 insert into t(g) values ('LINESTRING(-10 -50, 20 30)');
-select '#877.3', st_estimated_extent('t','g');
+select '#877.3', ST_EstimatedExtent('t','g');
 analyze t;
-select '#877.4', st_estimated_extent('t','g');
+select '#877.4', ST_EstimatedExtent('t','g');
 truncate t;
-select '#818.1', st_estimated_extent('t','g');
+select '#818.1', ST_EstimatedExtent('t','g');
+select '#818.1.deprecated', ST_Estimated_Extent('t','g');
 drop table t;
 
 -- #1320
index 29759788c82c27637a8b1847f37e6a3657c5d4eb..dea31a9e6992c9eac402487662d0fa0bfca2ac59 100644 (file)
@@ -146,11 +146,15 @@ NOTICE:  "<current>"."t"."g" is empty or not analyzed
 #877.1|
 NOTICE:  "public"."t"."g" is empty or not analyzed
 #877.2|
+NOTICE:  "public"."t"."g" is empty or not analyzed
+#877.2.deprecated|
 NOTICE:  "<current>"."t"."g" is empty or not analyzed
 #877.3|
 #877.4|BOX(-10 -50,20 30)
 NOTICE:  "<current>"."t"."g" is empty or not analyzed
 #818.1|
+NOTICE:  "<current>"."t"."g" is empty or not analyzed
+#818.1.deprecated|
 <#1320>
 #1320.geog.1|MULTIPOLYGON|4326
 #1320.geom.1|MULTIPOLYGON|4326