diff options
Diffstat (limited to 'doc/src/sgml/ref/create_aggregate.sgml')
| -rw-r--r-- | doc/src/sgml/ref/create_aggregate.sgml | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/create_aggregate.sgml b/doc/src/sgml/ref/create_aggregate.sgml index 837b83c00b..7a6f8a97fd 100644 --- a/doc/src/sgml/ref/create_aggregate.sgml +++ b/doc/src/sgml/ref/create_aggregate.sgml @@ -28,6 +28,9 @@ CREATE AGGREGATE <replaceable class="parameter">name</replaceable> ( [ <replacea [ , FINALFUNC = <replaceable class="PARAMETER">ffunc</replaceable> ] [ , FINALFUNC_EXTRA ] [ , COMBINEFUNC = <replaceable class="PARAMETER">combinefunc</replaceable> ] + [ , SERIALFUNC = <replaceable class="PARAMETER">serialfunc</replaceable> ] + [ , DESERIALFUNC = <replaceable class="PARAMETER">deserialfunc</replaceable> ] + [ , SERIALTYPE = <replaceable class="PARAMETER">serialtype</replaceable> ] [ , INITCOND = <replaceable class="PARAMETER">initial_condition</replaceable> ] [ , MSFUNC = <replaceable class="PARAMETER">msfunc</replaceable> ] [ , MINVFUNC = <replaceable class="PARAMETER">minvfunc</replaceable> ] @@ -47,6 +50,9 @@ CREATE AGGREGATE <replaceable class="parameter">name</replaceable> ( [ [ <replac [ , FINALFUNC = <replaceable class="PARAMETER">ffunc</replaceable> ] [ , FINALFUNC_EXTRA ] [ , COMBINEFUNC = <replaceable class="PARAMETER">combinefunc</replaceable> ] + [ , SERIALFUNC = <replaceable class="PARAMETER">serialfunc</replaceable> ] + [ , DESERIALFUNC = <replaceable class="PARAMETER">deserialfunc</replaceable> ] + [ , SERIALTYPE = <replaceable class="PARAMETER">serialtype</replaceable> ] [ , INITCOND = <replaceable class="PARAMETER">initial_condition</replaceable> ] [ , HYPOTHETICAL ] ) @@ -61,6 +67,9 @@ CREATE AGGREGATE <replaceable class="PARAMETER">name</replaceable> ( [ , FINALFUNC = <replaceable class="PARAMETER">ffunc</replaceable> ] [ , FINALFUNC_EXTRA ] [ , COMBINEFUNC = <replaceable class="PARAMETER">combinefunc</replaceable> ] + [ , SERIALFUNC = <replaceable class="PARAMETER">serialfunc</replaceable> ] + [ , DESERIALFUNC = <replaceable class="PARAMETER">deserialfunc</replaceable> ] + [ , SERIALTYPE = <replaceable class="PARAMETER">serialtype</replaceable> ] [ , INITCOND = <replaceable class="PARAMETER">initial_condition</replaceable> ] [ , MSFUNC = <replaceable class="PARAMETER">msfunc</replaceable> ] [ , MINVFUNC = <replaceable class="PARAMETER">minvfunc</replaceable> ] @@ -437,6 +446,47 @@ SELECT col FROM tab ORDER BY col USING sortop LIMIT 1; </varlistentry> <varlistentry> + <term><replaceable class="PARAMETER">serialfunc</replaceable></term> + <listitem> + <para> + In order to allow aggregate functions with an <literal>INTERNAL</> + <replaceable class="PARAMETER">state_data_type</replaceable> to + participate in parallel aggregation, the aggregate must have a valid + <replaceable class="PARAMETER">serialfunc</replaceable>, which must + serialize the aggregate state into <replaceable class="PARAMETER"> + serialtype</replaceable>. This function must take a single argument of + <replaceable class="PARAMETER">state_data_type</replaceable> and return + <replaceable class="PARAMETER">serialtype</replaceable>. A + corresponding <replaceable class="PARAMETER">deserialfunc</replaceable> + is also required. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><replaceable class="PARAMETER">deserialfunc</replaceable></term> + <listitem> + <para> + Deserializes a previously serialized aggregate state back into + <replaceable class="PARAMETER">state_data_type</replaceable>. This + function must take a single argument of <replaceable class="PARAMETER"> + serialtype</replaceable> and return <replaceable class="PARAMETER"> + state_data_type</replaceable>. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><replaceable class="PARAMETER">serialtype</replaceable></term> + <listitem> + <para> + The data type to into which an <literal>INTERNAL</literal> aggregate + state should be serialized. + </para> + </listitem> + </varlistentry> + + <varlistentry> <term><replaceable class="PARAMETER">initial_condition</replaceable></term> <listitem> <para> |
