diff options
author | Robert Haas <rhaas@postgresql.org> | 2016-04-05 16:06:15 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2016-04-05 16:06:15 -0400 |
commit | 41ea0c23761ca108e2f08f6e3151e3cb1f9652a1 (patch) | |
tree | 7872e32b41314042e081bb8435379e55d5148cff /doc/src | |
parent | 09adc9a8c09c9640de05c7023b27fb83c761e91c (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 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/create_aggregate.sgml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/create_aggregate.sgml b/doc/src/sgml/ref/create_aggregate.sgml index 7a6f8a97fda..3df330393de 100644 --- a/doc/src/sgml/ref/create_aggregate.sgml +++ b/doc/src/sgml/ref/create_aggregate.sgml @@ -40,6 +40,7 @@ CREATE AGGREGATE <replaceable class="parameter">name</replaceable> ( [ <replacea [ , MFINALFUNC_EXTRA ] [ , MINITCOND = <replaceable class="PARAMETER">minitial_condition</replaceable> ] [ , SORTOP = <replaceable class="PARAMETER">sort_operator</replaceable> ] + [ , PARALLEL = { SAFE | RESTRICTED | UNSAFE } ] ) CREATE AGGREGATE <replaceable class="parameter">name</replaceable> ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">arg_data_type</replaceable> [ , ... ] ] @@ -55,6 +56,8 @@ CREATE AGGREGATE <replaceable class="parameter">name</replaceable> ( [ [ <replac [ , SERIALTYPE = <replaceable class="PARAMETER">serialtype</replaceable> ] [ , INITCOND = <replaceable class="PARAMETER">initial_condition</replaceable> ] [ , HYPOTHETICAL ] + [ , PARALLEL = { SAFE | RESTRICTED | UNSAFE } ] + ) <phrase>or the old syntax</phrase> @@ -684,6 +687,12 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; Currently, ordered-set aggregates do not need to support moving-aggregate mode, since they cannot be used as window functions. </para> + + <para> + The meaning of <literal>PARALLEL SAFE</>, <literal>PARALLEL RESTRICTED</>, + and <literal>PARALLEL UNSAFE</> is the same as for + <xref linkend="sql-createfunction">. + </para> </refsect1> <refsect1> |