From: Paul Ramsey Date: Wed, 24 Feb 2016 16:12:33 +0000 (+0000) Subject: Fix geography/geometry casting issues in buffer tests X-Git-Tag: 2.3.0beta1~237 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c87841d82a2dc90515e3f450f5469d1b86119326;p=postgis Fix geography/geometry casting issues in buffer tests git-svn-id: http://svn.osgeo.org/postgis/trunk@14684 b70326c6-7e19-0410-871a-916f4a2858ee --- 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