]> granicus.if.org Git - postgis/commitdiff
-ST_AddBand should add the new band as the last band if no band index is apecified
authorPierre Racine <Pierre.Racine@sbf.ulaval.ca>
Thu, 24 Mar 2011 22:55:47 +0000 (22:55 +0000)
committerPierre Racine <Pierre.Racine@sbf.ulaval.ca>
Thu, 24 Mar 2011 22:55:47 +0000 (22:55 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@6966 b70326c6-7e19-0410-871a-916f4a2858ee

raster/rt_pg/rtpostgis.sql.in.c

index e2043c49f1f44164213160d55094957864d7fc03..8c94349819705a6840a3621506e0bc50b08bd5e8 100644 (file)
@@ -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)