From 41ea0c23761ca108e2f08f6e3151e3cb1f9652a1 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Tue, 5 Apr 2016 16:06:15 -0400 Subject: Fix parallel-safety code for parallel aggregation. has_parallel_hazard() was ignoring the proparallel markings for aggregates, which is no good. Fix that. There was no way to mark an aggregate as actually being parallel-safe, either, so add a PARALLEL option to CREATE AGGREGATE. Patch by me, reviewed by David Rowley. --- src/backend/commands/functioncmds.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/backend/commands/functioncmds.c') diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c index a745d73c7a5..748c8f75d48 100644 --- a/src/backend/commands/functioncmds.c +++ b/src/backend/commands/functioncmds.c @@ -566,9 +566,8 @@ interpret_func_parallel(DefElem *defel) else { ereport(ERROR, - (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("parallel option \"%s\" not recognized", - str))); + (errcode(ERRCODE_SYNTAX_ERROR), + errmsg("parameter \"parallel\" must be SAFE, RESTRICTED, or UNSAFE"))); return PROPARALLEL_UNSAFE; /* keep compiler quiet */ } } -- cgit v1.2.3