Opened 14 years ago
Closed 13 years ago
#644 closed defect (fixed)
[raster] ST_MapAlgebra raster/scripts/plpgsql some broken
Reported by: | robe | Owned by: | pracine |
---|---|---|---|
Priority: | blocker | Milestone: | PostGIS 2.0.0 |
Component: | raster | Version: | master |
Keywords: | Cc: |
Description
— this is invalid (that should be $4 I believe)
CREATE OR REPLACE FUNCTION ST_MapAlgebra(rast raster, band integer, expression text, nodatavalexpr text) RETURNS raster AS 'SELECT ST_MapAlgebra($1, $2, $3, nodatavalexpr, NULL)' LANGUAGE 'SQL' IMMUTABLE;
—- this is invalid (it might be because I'm testing on 9.1 (though 9.0 should have the same issue) since both support named variables function call syntax and so are more stringent about naming -
CREATE OR REPLACE FUNCTION ST_MapAlgebra(rast raster, expression text, nodatavalexpr text) RETURNS raster AS 'SELECT ST_MapAlgebra($1, 1, $2, $3, NULL)' LANGUAGE 'SQL' IMMUTABLE;
gives error
ERROR: cannot change name of input parameter "pixeltype" HINT: Use DROP FUNCTION first.
Attachments (1)
Change History (7)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Summary: | ST_MapAlgebra raster/scripts/plpgsql some broken → [raster] ST_MapAlgebra raster/scripts/plpgsql some broken |
---|
comment:3 by , 14 years ago
Status: | new → assigned |
---|
comment:4 by , 14 years ago
Priority: | medium → blocker |
---|
by , 14 years ago
Attachment: | fix_map_algebra.sql added |
---|
Attached are fixes that repair the prototype st_mapalgebra.sql file in the scripts/plpgsql folder.
comment:5 by , 13 years ago
Fixed in r7659 by removing all the variants. They are not necessary in the prototype.
comment:6 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
To add to this — this function also makes use of
Can't we just replace this with is ST_NumBands(rast) < band