Add PARALLEL parameter to functions

This commit is contained in:
Raul Marin
2017-10-24 14:16:56 +02:00
committed by Raúl Marín
parent f24d15f6ca
commit 0abc2ba250
41 changed files with 165 additions and 162 deletions

View File

@@ -12,7 +12,7 @@ BEGIN
EXECUTE Format('ANALYZE %s;', reloid);
END IF;
END
$$ LANGUAGE 'plpgsql' VOLATILE STRICT SECURITY DEFINER;
$$ LANGUAGE 'plpgsql' VOLATILE STRICT PARALLEL RESTRICTED SECURITY DEFINER;
-- Return a row count estimate of the result of a query using statistics
CREATE OR REPLACE FUNCTION CDB_EstimateRowCount(query text)
@@ -28,4 +28,4 @@ BEGIN
EXECUTE 'EXPLAIN (FORMAT JSON) ' || query INTO STRICT plan;
RETURN plan->0->'Plan'->'Plan Rows';
END
$$ LANGUAGE 'plpgsql' VOLATILE STRICT;
$$ LANGUAGE 'plpgsql' VOLATILE STRICT PARALLEL RESTRICTED;