From c87841d82a2dc90515e3f450f5469d1b86119326 Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Wed, 24 Feb 2016 16:12:33 +0000 Subject: [PATCH] Fix geography/geometry casting issues in buffer tests git-svn-id: http://svn.osgeo.org/postgis/trunk@14684 b70326c6-7e19-0410-871a-916f4a2858ee --- postgis/geography.sql.in | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/postgis/geography.sql.in b/postgis/geography.sql.in index 9ab1844f1..1ef38ce93 100644 --- a/postgis/geography.sql.in +++ b/postgis/geography.sql.in @@ -749,7 +749,19 @@ CREATE OR REPLACE FUNCTION ST_Buffer(geography, float8, integer) 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; @@ -760,6 +772,16 @@ CREATE OR REPLACE FUNCTION ST_Buffer(text, float8) $$ 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 -- 2.40.0