Fix PARALLEL tags

Fixes #333
This commit is contained in:
Javier Goizueta 2018-07-18 12:13:31 +02:00
parent c4980a90f9
commit 2766bbc83a
2 changed files with 5 additions and 2 deletions

View File

@ -1,3 +1,6 @@
0.23.1 (yyyy-mm-dd)
* Fix `CDB_EstimateRowCount` parallelizability #333
0.23.0 (2018-07-03)
* Add a new helper function `_CDB_Table_Exists(table_name_with_optional_schema TEXT)` #332

View File

@ -12,7 +12,7 @@ BEGIN
EXECUTE Format('ANALYZE %s;', reloid);
END IF;
END
$$ LANGUAGE 'plpgsql' VOLATILE STRICT PARALLEL RESTRICTED SECURITY DEFINER;
$$ LANGUAGE 'plpgsql' VOLATILE STRICT PARALLEL UNSAFE 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 PARALLEL RESTRICTED;
$$ LANGUAGE 'plpgsql' VOLATILE STRICT PARALLEL UNSAFE;