id summary reporter owner description type status priority milestone component version resolution keywords cc 969 [raster] Inconsistent order of named args in ST_MapAlgebra robe robe "You would only see this error in PostgreSQL 9.0. In PostgreSQL 8.4, it would just install the last one I think. So the error I get is: {{{ psql:share/contrib/postgis-2.0/rtpostgis.sql:1471: ERROR: cannot change name of input parameter ""pixeltype"" HINT: Use DROP FUNCTION first. }}} The issue is your ST_MapAlgebra have arguments lists that are not in same order but have the same type. This is illegal in PostgreSQL 9.0+ because PostgreSQL 9.0+ supports named arguments which means I can do ST_MapAlgebra(pixeltype:='8BUI',...) completely out of order. But since the way your functions are written could result in an ambiguous function path, your orders need to be the same. Sorry if I'm not making sense. --Any rate your issue is here. This is illegal in PostgreSQL 9.0+. I think you just need to swap the order of pixeltype and nodataexpress {{{ -- This function can not be STRICT, because nodatavalueexpr can be NULL (could be just '' though) -- or pixeltype can not be determined (could be st_bandpixeltype(raster, band) though) CREATE OR REPLACE FUNCTION st_mapalgebra(rast raster, expression text, nodatavalueexpr text, pixeltype text) RETURNS raster AS $$ SELECT st_mapalgebra($1, 1, $2, $3, $4) $$ LANGUAGE SQL; -- This function can not be STRICT, because nodatavalueexpr can be NULL (could be just '' though) CREATE OR REPLACE FUNCTION st_mapalgebra(rast raster, expression text, nodatavalueexpr text) RETURNS raster AS $$ SELECT st_mapalgebra($1, 1, $2, $3, NULL) $$ LANGUAGE SQL; }}} " defect closed blocker PostGIS 2.0.0 raster master invalid