From: Pierre Racine Date: Thu, 24 Mar 2011 22:55:47 +0000 (+0000) Subject: -ST_AddBand should add the new band as the last band if no band index is apecified X-Git-Tag: 2.0.0alpha1~1836 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7170e034001902b9143b85fa1d996b09ae647848;p=postgis -ST_AddBand should add the new band as the last band if no band index is apecified git-svn-id: http://svn.osgeo.org/postgis/trunk@6966 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/raster/rt_pg/rtpostgis.sql.in.c b/raster/rt_pg/rtpostgis.sql.in.c index e2043c49f..8c9434981 100644 --- a/raster/rt_pg/rtpostgis.sql.in.c +++ b/raster/rt_pg/rtpostgis.sql.in.c @@ -188,18 +188,18 @@ CREATE OR REPLACE FUNCTION st_addband(rast raster, index int, pixeltype text, in CREATE OR REPLACE FUNCTION st_addband(rast raster, pixeltype text) RETURNS raster - AS 'select st_addband($1, 1, $2, 0, NULL)' + AS 'select st_addband($1, NULL, $2, 0, NULL)' LANGUAGE 'SQL' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION st_addband(rast raster, pixeltype text, initialvalue float8) RETURNS raster - AS 'select st_addband($1, 1, $2, $3, NULL)' + AS 'select st_addband($1, NULL, $2, $3, NULL)' LANGUAGE 'SQL' IMMUTABLE STRICT; -- This function can not be STRICT, because nodataval can be NULL indicating that no nodata value should be set CREATE OR REPLACE FUNCTION st_addband(rast raster, pixeltype text, initialvalue float8, nodataval float8) RETURNS raster - AS 'select st_addband($1, 1, $2, $3, $4)' + AS 'select st_addband($1, NULL, $2, $3, $4)' LANGUAGE 'SQL' IMMUTABLE; CREATE OR REPLACE FUNCTION st_addband(rast raster, index int, pixeltype text)