From: Regina Obe Date: Sun, 1 Jan 2012 03:41:15 +0000 (+0000) Subject: #1423 revision -- put back the strict but set default prefix to '' AND NULLIF it... X-Git-Tag: 2.0.0alpha1~241 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bec0bbba5feebc76be7dbfaa95668460d1c48198;p=postgis #1423 revision -- put back the strict but set default prefix to '' AND NULLIF it in the function git-svn-id: http://svn.osgeo.org/postgis/trunk@8634 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis/geography.sql.in.c b/postgis/geography.sql.in.c index 6bffccd92..ff460b5aa 100644 --- a/postgis/geography.sql.in.c +++ b/postgis/geography.sql.in.c @@ -428,10 +428,10 @@ CREATE OR REPLACE FUNCTION ST_AsGML(geog geography, maxdecimaldigits int4 DEFAUL -- ST_AsGML(version, geography, precision, option, prefix) -- Changed: 2.0.0 to use default args and allow named args -CREATE OR REPLACE FUNCTION ST_AsGML(version int4, geog geography, maxdecimaldigits int4 DEFAULT 15, options int4 DEFAULT 0, nprefix text DEFAULT null) +CREATE OR REPLACE FUNCTION ST_AsGML(version int4, geog geography, maxdecimaldigits int4 DEFAULT 15, options int4 DEFAULT 0, nprefix text DEFAULT '') RETURNS text - AS 'SELECT _ST_AsGML($1, $2, $3, $4, $5)' - LANGUAGE 'SQL' IMMUTABLE; + AS $$ SELECT _ST_AsGML($1, $2, $3, $4, NULLIF($5, ''));$$ + LANGUAGE 'SQL' IMMUTABLE STRICT; -- -- KML OUTPUT diff --git a/postgis/postgis.sql.in.c b/postgis/postgis.sql.in.c index 0eaa1f70c..2814face9 100644 --- a/postgis/postgis.sql.in.c +++ b/postgis/postgis.sql.in.c @@ -3170,7 +3170,7 @@ CREATE OR REPLACE FUNCTION _ST_AsGML(int4, geometry, int4, int4, text) -- Changed: 2.0.0 to have default args CREATE OR REPLACE FUNCTION ST_AsGML(geom geometry, maxdecimaldigits int4 DEFAULT 15, options int4 DEFAULT 0) RETURNS TEXT - AS 'SELECT _ST_AsGML(2, $1, $2, $3, null)' + AS $$ SELECT _ST_AsGML(2, $1, $2, $3, null); $$ LANGUAGE 'SQL' IMMUTABLE STRICT; -- ST_AsGML(version, geom, precision, option) @@ -3178,10 +3178,10 @@ CREATE OR REPLACE FUNCTION ST_AsGML(geom geometry, maxdecimaldigits int4 DEFAULT -- ST_AsGML(version, geom, precision, option, prefix) -- Availability: 2.0.0 -- Changed: 2.0.0 to use default and named args -CREATE OR REPLACE FUNCTION ST_AsGML(version int4, geom geometry, maxdecimaldigits int4 DEFAULT 15, options int4 DEFAULT 0, nprefix text DEFAULT null) +CREATE OR REPLACE FUNCTION ST_AsGML(version int4, geom geometry, maxdecimaldigits int4 DEFAULT 15, options int4 DEFAULT 0, nprefix text DEFAULT '') RETURNS TEXT - AS 'SELECT _ST_AsGML($1, $2, $3, $4, $5)' - LANGUAGE 'SQL' IMMUTABLE; + AS $$ SELECT _ST_AsGML($1, $2, $3, $4, NULLIF($5, '')); $$ + LANGUAGE 'SQL' IMMUTABLE STRICT; ----------------------------------------------------------------------- -- KML OUTPUT