summaryrefslogtreecommitdiff
path: root/src/backend/commands/functioncmds.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2016-04-05 16:06:15 -0400
committerRobert Haas <rhaas@postgresql.org>2016-04-05 16:06:15 -0400
commit41ea0c23761ca108e2f08f6e3151e3cb1f9652a1 (patch)
tree7872e32b41314042e081bb8435379e55d5148cff /src/backend/commands/functioncmds.c
parent09adc9a8c09c9640de05c7023b27fb83c761e91c (diff)
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.
Diffstat (limited to 'src/backend/commands/functioncmds.c')
-rw-r--r--src/backend/commands/functioncmds.c5
1 files changed, 2 insertions, 3 deletions
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 */
}
}