public inbox for [email protected]help / color / mirror / Atom feed
PARALLEL in old syntax for CREATE AGGREGATE 3+ messages / 2 participants [nested] [flat]
* PARALLEL in old syntax for CREATE AGGREGATE @ 2017-11-27 15:00 Daniel Gustafsson <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Daniel Gustafsson @ 2017-11-27 15:00 UTC (permalink / raw) To: pgsql-docs When looking at review comments on one of my patches, I noticed that commit 41ea0c23761 didn’t include the PARALLEL keyword for the old style CREATE AGGREGATE syntax. Since it is supported, and commit 59b71c6fe6c use it in a testcase, it seems reasonable to add something along the lines of the attached patch to the docs. cheers ./daniel Attachments: [application/octet-stream] create_agg_parallel.patch (1.4K, 2-create_agg_parallel.patch) download | inline diff: From 2ed82ee3f3fa28bd69f2981730cf60d89c8f3867 Mon Sep 17 00:00:00 2001 From: Daniel Gustafsson <[email protected]> Date: Mon, 27 Nov 2017 15:29:15 +0100 Subject: [PATCH 2/2] doc: add PARALLEL option to old syntax for CREATE AGGREGATE The old pre-8.2 syntax for CREATE AGGREGATE also support PARALLEL, even though it's required to be quoted as PARALLEL is an unreserved keyword. --- doc/src/sgml/ref/create_aggregate.sgml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/src/sgml/ref/create_aggregate.sgml b/doc/src/sgml/ref/create_aggregate.sgml index a4aaae876e..d813ec41e6 100644 --- a/doc/src/sgml/ref/create_aggregate.sgml +++ b/doc/src/sgml/ref/create_aggregate.sgml @@ -80,6 +80,7 @@ CREATE AGGREGATE <replaceable class="parameter">name</replaceable> ( [ , MFINALFUNC_MODIFY = { READ_ONLY | SHARABLE | READ_WRITE } ] [ , MINITCOND = <replaceable class="parameter">minitial_condition</replaceable> ] [ , SORTOP = <replaceable class="parameter">sort_operator</replaceable> ] + [ , "PARALLEL" = { SAFE | RESTRICTED | UNSAFE } ] ) </synopsis> </refsynopsisdiv> @@ -630,6 +631,10 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; functions are not consulted by the planner, only the marking of the aggregate itself. </para> + <para> + Note that when using the old syntax, <literal>"PARALLEL"</literal> must + be quoted. + </para> </listitem> </varlistentry> -- 2.14.1.145.gb3622a4ee ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: PARALLEL in old syntax for CREATE AGGREGATE @ 2018-01-24 02:52 Bruce Momjian <[email protected]> parent: Daniel Gustafsson <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Bruce Momjian @ 2018-01-24 02:52 UTC (permalink / raw) To: Daniel Gustafsson <[email protected]>; +Cc: pgsql-docs; Robert Haas <[email protected]> Robert, can you review the attached patch since it references your commit? Thanks. --------------------------------------------------------------------------- On Mon, Nov 27, 2017 at 04:00:42PM +0100, Daniel Gustafsson wrote: > When looking at review comments on one of my patches, I noticed that commit > 41ea0c23761 didn’t include the PARALLEL keyword for the old style CREATE > AGGREGATE syntax. Since it is supported, and commit 59b71c6fe6c use it in a > testcase, it seems reasonable to add something along the lines of the attached > patch to the docs. > > cheers ./daniel > > From 2ed82ee3f3fa28bd69f2981730cf60d89c8f3867 Mon Sep 17 00:00:00 2001 > From: Daniel Gustafsson <[email protected]> > Date: Mon, 27 Nov 2017 15:29:15 +0100 > Subject: [PATCH 2/2] doc: add PARALLEL option to old syntax for CREATE > AGGREGATE > > The old pre-8.2 syntax for CREATE AGGREGATE also support PARALLEL, > even though it's required to be quoted as PARALLEL is an unreserved > keyword. > --- > doc/src/sgml/ref/create_aggregate.sgml | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/doc/src/sgml/ref/create_aggregate.sgml b/doc/src/sgml/ref/create_aggregate.sgml > index a4aaae876e..d813ec41e6 100644 > --- a/doc/src/sgml/ref/create_aggregate.sgml > +++ b/doc/src/sgml/ref/create_aggregate.sgml > @@ -80,6 +80,7 @@ CREATE AGGREGATE <replaceable class="parameter">name</replaceable> ( > [ , MFINALFUNC_MODIFY = { READ_ONLY | SHARABLE | READ_WRITE } ] > [ , MINITCOND = <replaceable class="parameter">minitial_condition</replaceable> ] > [ , SORTOP = <replaceable class="parameter">sort_operator</replaceable> ] > + [ , "PARALLEL" = { SAFE | RESTRICTED | UNSAFE } ] > ) > </synopsis> > </refsynopsisdiv> > @@ -630,6 +631,10 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; > functions are not consulted by the planner, only the marking of the > aggregate itself. > </para> > + <para> > + Note that when using the old syntax, <literal>"PARALLEL"</literal> must > + be quoted. > + </para> > </listitem> > </varlistentry> > > -- > 2.14.1.145.gb3622a4ee > > > -- Bruce Momjian <[email protected]> http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription + ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: PARALLEL in old syntax for CREATE AGGREGATE @ 2018-01-24 08:56 Daniel Gustafsson <[email protected]> parent: Bruce Momjian <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Daniel Gustafsson @ 2018-01-24 08:56 UTC (permalink / raw) To: Bruce Momjian <[email protected]>; +Cc: pgsql-docs; Robert Haas <[email protected]> > On 24 Jan 2018, at 03:52, Bruce Momjian <[email protected]> wrote: > > Robert, can you review the attached patch since it references your > commit? Thanks. Another approach is the patch in [email protected] which contains a fix which allows for PARALLEL to be unquoted in the old syntax. cheers ./daniel ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2018-01-24 08:56 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2017-11-27 15:00 PARALLEL in old syntax for CREATE AGGREGATE Daniel Gustafsson <[email protected]> 2018-01-24 02:52 ` Bruce Momjian <[email protected]> 2018-01-24 08:56 ` Daniel Gustafsson <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox