From: Sandro Santilli Date: Mon, 16 Jan 2012 15:39:24 +0000 (+0000) Subject: Add an ST_AsEWKT(text) to prefer geometry over geography X-Git-Tag: 2.0.0alpha1~35 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f951b8a1cfec9c5cad48ad374af649598bf7793e;p=postgis Add an ST_AsEWKT(text) to prefer geometry over geography git-svn-id: http://svn.osgeo.org/postgis/trunk@8845 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis/geography.sql.in.c b/postgis/geography.sql.in.c index 1903e838a..c85e85af6 100644 --- a/postgis/geography.sql.in.c +++ b/postgis/geography.sql.in.c @@ -676,6 +676,13 @@ CREATE OR REPLACE FUNCTION ST_AsEWKT(geography) RETURNS TEXT AS 'MODULE_PATHNAME','LWGEOM_asEWKT' LANGUAGE 'C' IMMUTABLE STRICT; + +-- Availability: 2.0.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography +CREATE OR REPLACE FUNCTION ST_AsEWKT(text) + RETURNS text AS + $$ SELECT ST_AsEWKT($1::geometry); $$ + LANGUAGE 'SQL' IMMUTABLE STRICT; + -----------------------------------------------------------------------------