mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +03:00
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.
This commit is contained in:
@ -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 */
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user