[postgis-tickets] r16483 - schema qualify geography functions (including ST_Buffer)
Regina Obe
lr at pcorp.us
Thu Mar 22 07:43:26 PDT 2018
Author: robe
Date: 2018-03-22 19:43:26 -0700 (Thu, 22 Mar 2018)
New Revision: 16483
Modified:
trunk/postgis/geography.sql.in
Log:
schema qualify geography functions (including ST_Buffer)
Closes #4052 for PostGIS 2.5 (trunk)
Modified: trunk/postgis/geography.sql.in
===================================================================
--- trunk/postgis/geography.sql.in 2018-03-23 00:09:53 UTC (rev 16482)
+++ trunk/postgis/geography.sql.in 2018-03-23 02:43:26 UTC (rev 16483)
@@ -69,6 +69,8 @@
alignment = double
);
+
+
-- Availability: 1.5.0
CREATE OR REPLACE FUNCTION geography(geography, integer, boolean)
RETURNS geography
@@ -111,7 +113,7 @@
-- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
CREATE OR REPLACE FUNCTION ST_AsText(text)
RETURNS text AS
- $$ SELECT ST_AsText($1::@extschema at .geometry); $$
+ $$ SELECT @extschema at .ST_AsText($1::@extschema at .geometry); $$
LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
-- Availability: 1.5.0
@@ -272,6 +274,7 @@
AS 'MODULE_PATHNAME' ,'gserialized_gist_geog_distance'
LANGUAGE 'c';
+
-- Availability: 1.5.0
CREATE OPERATOR CLASS gist_geography_ops
DEFAULT FOR TYPE geography USING GIST AS
@@ -384,6 +387,7 @@
OPERATOR 5 > ,
FUNCTION 1 geography_cmp (geography, geography);
+
-- ---------- ---------- ---------- ---------- ---------- ---------- ----------
-- Export Functions
-- Availability: 1.5.0
@@ -404,7 +408,7 @@
-- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
CREATE OR REPLACE FUNCTION ST_AsSVG(text)
RETURNS text AS
- $$ SELECT ST_AsSVG($1::@extschema at .geometry,0,15); $$
+ $$ SELECT @extschema at .ST_AsSVG($1::@extschema at .geometry,0,15); $$
LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
--
@@ -540,7 +544,7 @@
-- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
CREATE OR REPLACE FUNCTION ST_Distance(text, text)
RETURNS float8 AS
- $$ SELECT ST_Distance($1::@extschema at .geometry, $2::@extschema at .geometry); $$
+ $$ SELECT @extschema at .ST_Distance($1::@extschema at .geometry, $2::@extschema at .geometry); $$
LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
-- Only expands the bounding box, the actual geometry will remain unchanged, use with care.
@@ -567,9 +571,10 @@
-- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
CREATE OR REPLACE FUNCTION ST_DWithin(text, text, float8)
RETURNS boolean AS
- $$ SELECT ST_DWithin($1::@extschema at .geometry, $2::@extschema at .geometry, $3); $$
+ $$ SELECT @extschema at .ST_DWithin($1::@extschema at .geometry, $2::@extschema at .geometry, $3); $$
LANGUAGE 'sql' IMMUTABLE _PARALLEL;
+
-- ---------- ---------- ---------- ---------- ---------- ---------- ----------
-- Distance/DWithin testing functions for cached operations.
-- For developer/tester use only.
@@ -634,7 +639,7 @@
-- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
CREATE OR REPLACE FUNCTION ST_Area(text)
RETURNS float8 AS
- $$ SELECT ST_Area($1::@extschema at .geometry); $$
+ $$ SELECT @extschema at .ST_Area($1::@extschema at .geometry); $$
LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
-- Availability: 1.5.0
@@ -695,7 +700,7 @@
-- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
CREATE OR REPLACE FUNCTION ST_Covers(text, text)
RETURNS boolean AS
- $$ SELECT ST_Covers($1::@extschema at .geometry, $2::@extschema at .geometry); $$
+ $$ SELECT @extschema at .ST_Covers($1::@extschema at .geometry, $2::@extschema at .geometry); $$
LANGUAGE 'sql' IMMUTABLE _PARALLEL;
-- Only implemented for polygon-over-point
@@ -708,7 +713,7 @@
-- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
CREATE OR REPLACE FUNCTION ST_CoveredBy(text, text)
RETURNS boolean AS
- $$ SELECT ST_CoveredBy($1::@extschema at .geometry, $2::@extschema at .geometry); $$
+ $$ SELECT @extschema at .ST_CoveredBy($1::@extschema at .geometry, $2::@extschema at .geometry); $$
LANGUAGE 'sql' IMMUTABLE _PARALLEL;
-- Availability: 2.1.0
@@ -727,7 +732,7 @@
-- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
CREATE OR REPLACE FUNCTION ST_Intersects(text, text)
RETURNS boolean AS
- $$ SELECT ST_Intersects($1::@extschema at .geometry, $2::@extschema at .geometry); $$
+ $$ SELECT @extschema at .ST_Intersects($1::@extschema at .geometry, $2::@extschema at .geometry); $$
LANGUAGE 'sql' IMMUTABLE _PARALLEL;
-- Availability: 1.5.0
@@ -745,43 +750,43 @@
-- Availability: 1.5.0
CREATE OR REPLACE FUNCTION ST_Buffer(geography, float8)
RETURNS geography
- AS 'SELECT geography(ST_Transform(ST_Buffer(ST_Transform(geometry($1), @extschema at ._ST_BestSRID($1)), $2), 4326))'
+ AS 'SELECT @extschema at .geography(@extschema at .ST_Transform(@extschema at .ST_Buffer(@extschema at .ST_Transform(@extschema at .geometry($1), @extschema at ._ST_BestSRID($1)), $2), 4326))'
LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
-- Availability: 2.3.x
CREATE OR REPLACE FUNCTION ST_Buffer(geography, float8, integer)
RETURNS geography
- AS 'SELECT geography(ST_Transform(ST_Buffer(ST_Transform(geometry($1), @extschema at ._ST_BestSRID($1)), $2, $3), 4326))'
+ AS 'SELECT @extschema at .geography(@extschema at .ST_Transform(@extschema at .ST_Buffer(@extschema at .ST_Transform(@extschema at .geometry($1), @extschema at ._ST_BestSRID($1)), $2, $3), 4326))'
LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
-- Availability: 2.3.x
CREATE OR REPLACE FUNCTION ST_Buffer(geography, float8, text)
RETURNS geography
- AS 'SELECT geography(ST_Transform(ST_Buffer(ST_Transform(geometry($1), @extschema at ._ST_BestSRID($1)), $2, $3), 4326))'
+ AS 'SELECT @extschema at .geography(@extschema at .ST_Transform(@extschema at .ST_Buffer(@extschema at .ST_Transform(@extschema at .geometry($1), @extschema at ._ST_BestSRID($1)), $2, $3), 4326))'
LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
-- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
CREATE OR REPLACE FUNCTION ST_Buffer(text, float8)
RETURNS geometry AS
- $$ SELECT ST_Buffer($1::@extschema at .geometry, $2); $$
+ $$ SELECT @extschema at .ST_Buffer($1::@extschema at .geometry, $2); $$
LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
-- Availability: 2.3.x
CREATE OR REPLACE FUNCTION ST_Buffer(text, float8, integer)
RETURNS geometry AS
- $$ SELECT ST_Buffer($1::@extschema at .geometry, $2, $3); $$
+ $$ SELECT @extschema at .ST_Buffer($1::@extschema at .geometry, $2, $3); $$
LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
-- Availability: 2.3.x
CREATE OR REPLACE FUNCTION ST_Buffer(text, float8, text)
RETURNS geometry AS
- $$ SELECT ST_Buffer($1::@extschema at .geometry, $2, $3); $$
+ $$ SELECT @extschema at .ST_Buffer($1::@extschema at .geometry, $2, $3); $$
LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
-- Availability: 1.5.0
CREATE OR REPLACE FUNCTION ST_Intersection(geography, geography)
RETURNS geography
- AS 'SELECT geography(ST_Transform(ST_Intersection(ST_Transform(geometry($1), @extschema at ._ST_BestSRID($1, $2)), ST_Transform(geometry($2), @extschema at ._ST_BestSRID($1, $2))), 4326))'
+ AS 'SELECT @extschema at .geography(@extschema at .ST_Transform(@extschema at .ST_Intersection(@extschema at .ST_Transform(@extschema at .geometry($1), @extschema at ._ST_BestSRID($1, $2)), @extschema at .ST_Transform(@extschema at .geometry($2), @extschema at ._ST_BestSRID($1, $2))), 4326))'
LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
-- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
@@ -850,8 +855,11 @@
AS 'MODULE_PATHNAME','geography_centroid'
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
+
-- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
CREATE OR REPLACE FUNCTION ST_Centroid(text)
RETURNS geometry AS
- $$ SELECT ST_Centroid($1::@extschema at .geometry); $$
+ $$ SELECT @extschema at .ST_Centroid($1::@extschema at .geometry); $$
LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
+
+-----------------------------------------------------------------------------
More information about the postgis-tickets
mailing list