]> granicus.if.org Git - postgis/commitdiff
Changed get_proj4_from_srid() implementation from SQL to PLPGSQL to
authorSandro Santilli <strk@keybit.net>
Wed, 16 Mar 2005 15:08:01 +0000 (15:08 +0000)
committerSandro Santilli <strk@keybit.net>
Wed, 16 Mar 2005 15:08:01 +0000 (15:08 +0000)
workaround a bug of pgsql8.0.{1,2}

git-svn-id: http://svn.osgeo.org/postgis/trunk@1539 b70326c6-7e19-0410-871a-916f4a2858ee

CHANGES
lwgeom/lwpostgis.sql.in

diff --git a/CHANGES b/CHANGES
index 579e3324793fbb1d77650d2ca5be062968d1f585..ce491a69e81346f8eb47ce9b62a92b655986e849 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -15,6 +15,8 @@ PostGIS 1.0.0RC4
        - subselects support in selectivity estimator 
        - bug fixes for 64bit architectures
        - bugfix in loaded, skipping all but first hole of polygons.
+       - changed get_proj4_from_srid implementation to use plpgsql
+         instead of sql to workaround a pgsql80x bug.
 
 PostGIS 1.0.0RC3
 2005/02/24
index 5fa00b0c566796ab0e4e2d4dae99e61c6f53a691..351843d8553431ce1f1ff7a8a9c67bb74bf8ba7e 100644 (file)
@@ -3018,8 +3018,14 @@ LANGUAGE 'plpgsql' _IMMUTABLE_STRICT; -- WITH (iscachable);
 ---------------------------------------------------------------
 
 CREATEFUNCTION get_proj4_from_srid(integer) RETURNS text AS
-'SELECT proj4text::text FROM spatial_ref_sys WHERE srid= $1' 
-LANGUAGE 'sql' _IMMUTABLE_STRICT; -- WITH (iscachable,isstrict);
+'
+BEGIN
+       RETURN proj4text::text FROM spatial_ref_sys WHERE srid= $1;
+END;
+'
+LANGUAGE 'plpgsql' IMMUTABLE STRICT; -- WITH (iscachable,isstrict);
+
+
 
 CREATEFUNCTION transform_geometry(geometry,text,text,int)
        RETURNS geometry