/* get function info */
fmgr_info(ufcnoid, &uflinfo);
+ /* function cannot return set */
+ err = 0;
+ if (uflinfo.fn_retset) {
+ elog(ERROR, "RASTER_mapAlgebra2: Function provided must return double precision not resultset");
+ err = 1;
+ }
+ /* function should have correct # of args */
+ else if (uflinfo.fn_nargs != 3) {
+ elog(ERROR, "RASTER_mapAlgebra2: Function does not have three input parameters");
+ err = 1;
+ }
+
+ if (err) {
+ for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]);
+ rt_raster_destroy(raster);
+
+ PG_RETURN_NULL();
+ }
+
+ if (func_volatile(ufcnoid) == 'v') {
+ elog(NOTICE, "Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE");
+ }
+
/* prep function call data */
#if POSTGIS_PGSQL_VERSION <= 90
InitFunctionCallInfoData(ufcinfo, &uflinfo, 3, InvalidOid, NULL);
DROP FUNCTION IF EXISTS ST_MapAlgebraExpr(raster, integer, text, text, text);
DROP FUNCTION IF EXISTS ST_MapAlgebraExpr(raster, text, text, text);
+--dropped functions
+DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, raster, regprocedure, VARIADIC text[]);
+
--added extra parameter so these are obsolete --
DROP FUNCTION IF EXISTS ST_AsRaster(geometry , integer , integer , double precision , double precision , text , double precision , double precision , double precision , double precision );
DROP FUNCTION IF EXISTS ST_AsRaster(geometry , integer , integer , text[] , double precision[] , double precision[] , double precision , double precision , double precision , double precision );
RETURN NULL;
END;
- $$ LANGUAGE 'plpgsql';
+ $$ LANGUAGE 'plpgsql' IMMUTABLE;
CREATE OR REPLACE FUNCTION raster_mapalgebra_union(
rast1 double precision,
RETURN NULL;
END;
- $$ LANGUAGE 'plpgsql';
+ $$ LANGUAGE 'plpgsql' IMMUTABLE;
CREATE OR REPLACE FUNCTION raster_mapalgebra_first(
rast1 double precision,
RETURN NULL;
END;
- $$ LANGUAGE 'plpgsql';
+ $$ LANGUAGE 'plpgsql' IMMUTABLE;
CREATE OR REPLACE FUNCTION raster_mapalgebra_second(
rast1 double precision,
NOTICE: The FIRST raster is NULL. Returning NULL
NOTICE: The FIRST raster is NULL. Returning NULL
NOTICE: The two rasters provided are NULL. Returning NULL
+NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE
+NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE
+NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE
+NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE
+NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE
+NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE
+NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE
+NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE
+NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE
+NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE
+NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE
+NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE
+NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE
+NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE
+NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE
+NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE
+NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE
+NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE
NOTICE: The SECOND raster is NULL. Returning NULL
NOTICE: The SECOND raster is NULL. Returning NULL
NOTICE: The SECOND raster is NULL. Returning NULL