]> granicus.if.org Git - postgis/commitdiff
Add an ST_AsEWKT(text) to prefer geometry over geography
authorSandro Santilli <strk@keybit.net>
Mon, 16 Jan 2012 15:39:24 +0000 (15:39 +0000)
committerSandro Santilli <strk@keybit.net>
Mon, 16 Jan 2012 15:39:24 +0000 (15:39 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8845 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/geography.sql.in.c

index 1903e838a427d3e3285326f9e6fbd19972337138..c85e85af67ec0766ae1227ce516da87d9702c27b 100644 (file)
@@ -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;
+
        
 -----------------------------------------------------------------------------