Add PARALLEL and VOLATILE categories to PG functions

This commit is contained in:
Raul Marin
2017-11-23 10:07:52 +01:00
committed by Raúl Marín
parent 3273afeb76
commit e1fd016ef1
19 changed files with 49 additions and 51 deletions
+2 -1
View File
@@ -8,7 +8,7 @@ CREATE OR REPLACE FUNCTION
end if;
return array_cat(current_state,current_row) ;
END
$$ LANGUAGE plpgsql;
$$ LANGUAGE plpgsql IMMUTABLE PARALLEL SAFE;
-- Create aggregate if it did not exist
DO $$
@@ -24,6 +24,7 @@ BEGIN
CREATE AGGREGATE CDB_PyAgg(NUMERIC[]) (
SFUNC = CDB_PyAggS,
STYPE = Numeric[],
PARALLEL = SAFE,
INITCOND = "{}"
);
END IF;