I've written a custom callback function for ST_MapAlgebra
and I want to pass additional arguments to it. The function is pretty useless - it just generates a raster filled with normal random values according to a user-specified mean and standard deviation.
I tried including the extra arguments in the string, like so:
...
ST_MapAlgebra(
b1.rast, -- raster to operate on
1,
'generate_random_raster(double precision[][][], integer[][], ''3'', ''1'')'::regprocedure
),
...
And like this:
...
ST_MapAlgebra(
b1.rast, -- raster to operate on
1,
'generate_random_raster(double precision[][][], integer[][], VARIADIC ARRAY[3,5]::text')'::regprocedure
),
...
It works fine if I hard code the values I want to use, so the callback itself isn't a problem.