From f951b8a1cfec9c5cad48ad374af649598bf7793e Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Mon, 16 Jan 2012 15:39:24 +0000 Subject: [PATCH] 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 --- postgis/geography.sql.in.c | 7 +++++++ 1 file changed, 7 insertions(+) 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; + ----------------------------------------------------------------------------- -- 2.50.1