[postgis-tickets] r14684 - Fix geography/geometry casting issues in buffer tests

Paul Ramsey pramsey at cleverelephant.ca
Wed Feb 24 08:12:33 PST 2016


Author: pramsey
Date: 2016-02-24 08:12:33 -0800 (Wed, 24 Feb 2016)
New Revision: 14684

Modified:
   trunk/postgis/geography.sql.in
Log:
Fix geography/geometry casting issues in buffer tests


Modified: trunk/postgis/geography.sql.in
===================================================================
--- trunk/postgis/geography.sql.in	2016-02-24 16:04:06 UTC (rev 14683)
+++ trunk/postgis/geography.sql.in	2016-02-24 16:12:33 UTC (rev 14684)
@@ -749,17 +749,39 @@
 	LANGUAGE 'sql' IMMUTABLE STRICT;
 
 -- Availability: 2.1.x
-CREATE OR REPLACE FUNCTION ST_Buffer(geography, float8, cstring)
+CREATE OR REPLACE FUNCTION ST_Buffer(geography, float8, text)
 	RETURNS geography
 	AS 'SELECT geography(ST_Transform(ST_Buffer(ST_Transform(geometry($1), _ST_BestSRID($1)), $2, $3), 4326))'
 	LANGUAGE 'sql' IMMUTABLE STRICT;
 
+-- Availability: 2.1.x
+CREATE OR REPLACE FUNCTION ST_Buffer(geography, float8, integer)
+	RETURNS geography
+	AS 'SELECT geography(ST_Transform(ST_Buffer(ST_Transform(geometry($1), _ST_BestSRID($1)), $2, $3), 4326))'
+	LANGUAGE 'sql' IMMUTABLE STRICT;
+
+-- Availability: 2.1.x
+CREATE OR REPLACE FUNCTION ST_Buffer(geography, float8, text)
+	RETURNS geography
+	AS 'SELECT geography(ST_Transform(ST_Buffer(ST_Transform(geometry($1), _ST_BestSRID($1)), $2, $3), 4326))'
+	LANGUAGE 'sql' IMMUTABLE STRICT;
+
 -- 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::geometry, $2);  $$
 	LANGUAGE 'sql' IMMUTABLE STRICT;
 
+CREATE OR REPLACE FUNCTION ST_Buffer(text, float8, integer)
+	RETURNS geometry AS
+	$$ SELECT ST_Buffer($1::geometry, $2, $3);  $$
+	LANGUAGE 'sql' IMMUTABLE STRICT;
+
+CREATE OR REPLACE FUNCTION ST_Buffer(text, float8, text)
+	RETURNS geometry AS
+	$$ SELECT ST_Buffer($1::geometry, $2, $3);  $$
+	LANGUAGE 'sql' IMMUTABLE STRICT;
+
 -- Availability: 1.5.0
 CREATE OR REPLACE FUNCTION ST_Intersection(geography, geography)
 	RETURNS geography



More information about the postgis-tickets mailing list