From 799de598b2e0715d6ca539e1e1be9b633d4ad61d Mon Sep 17 00:00:00 2001
From: Chuck Litzell To add a check constraint only to a table and not to its children: (The check constraint will not be inherited by future children, either.) Remove a check constraint from a table and all of its children:
When
When
Defines a new aggregate function.
Defines a new aggregate function. An aggregate
- function is identified by its name and input data types. Two aggregate functions in the same
- schema can have the same name if they operate on different input types. The name and input
- data types of an aggregate function must also be distinct from the name and input data types
- of every ordinary function in the same schema. An aggregate function is made from one,
- two or three ordinary functions (all of which must be
-
+ AGGREGATE can be used to provide the desired features.
If a schema name is given (for example,
An aggregate function is identified by its name and input data types. Two aggregate
+ functions in the same schema can have the same name if they operate on different input
+ types. The name and input data types of an aggregate function must also be distinct from the
+ name and input data types of every ordinary function in the same schema. This behavior is
+ identical to overloading of ordinary function names. See
A simple aggregate function is made from one, two, or three ordinary functions (which must
+ be
These functions are used as - follows:
You
- can specify
Single-level aggregation and
- two-level aggregation are equivalent execution strategies. Either type of aggregation can be
- implemented in a query plan. When you implement the functions
Greenplum Database creates a temporary
- variable of data type
An aggregate function can + follows:
Greenplum Database creates a temporary variable of data type
You can specify
Single-level aggregation and two-level aggregation are equivalent execution strategies. Either
+ type of aggregation can be implemented in a query plan. When you implement the functions
+
An aggregate function can provide an optional initial condition, an initial value for the internal state value. This is specified and stored in the database as a value of type text, but it must be a valid external representation of a constant of the state value data type. If it is not supplied @@ -62,24 +119,60 @@ ffunc( internal-state ) ---> aggregate-value
You
values. This is useful for implementing aggregates like
If the state transition function is
- not declared
If the final function is declared + condition or use a nonstrict transition function.
If the state transition function is not declared
If the final function is declared
Single argument aggregate functions, such as min or + sees there were zero input rows.
+
+ Sometimes it is useful to declare the final function as taking not just
+ the state value, but extra parameters corresponding to the aggregate's
+ input values. The main reason for doing this is if the final function
+ is polymorphic and the state value's data type would be inadequate to
+ pin down the result type. These extra parameters are always passed as
+
An aggregate can optionally support moving-aggregate mode, as described in
The syntax with
Single argument aggregate functions, such as min or max, can sometimes be optimized by looking into an index instead of scanning every input row. If this aggregate can be so optimized, indicate it by specifying a sort operator. The basic requirement is that the aggregate must yield the first element in the sort ordering induced by the operator; in other - words:
must be - equivalent - to:
Further + words:
must be equivalent to:
+Further
assumptions are that the aggregate function ignores
You
To be able to create an aggregate function, you must have
The ordinary functions used to define a new aggregate function must
@@ -153,16 +382,16 @@ ordered aggregate, using the syntax:
The following simple example creates an aggregate function that computes -the sum of two columns.
Before creating the aggregate function, create two functions that
-are used as the
This function is specified as the
Before creating the aggregate function, create two functions that are used as the
+
This function is specified as the
This function is specified as the
This function is specified as the
In
In
dynamically loadable object, and Removes a database role. A role cannot be removed if it is still referenced in any database;
-an error will be raised if so. Before dropping the role, you must drop
-all the objects it owns (or reassign their ownership) and revoke any
-privileges the role has been granted. The However, it is not necessary to remove role memberships involving
+roles, you must have A role cannot be removed if it is still referenced in any database; an error will be raised if
+ so. Before dropping the role, you must drop all the objects it owns (or reassign their
+ ownership) and revoke any privileges the role has been granted on other objects. The
+ However, it is not necessary to remove role memberships involving
the role; Prepared statements can take parameters: values that are substituted
-into the statement when it is executed. When creating the prepared statement,
-refer to parameters by position, using Prepared statements only last for the duration of the current database session. When the session
+ Prepared statements can take parameters: values that are substituted into the statement when it
+ is executed. When creating the prepared statement, refer to parameters by position, using
+ Prepared statements only last for the duration of the current database session. When the session
ends, the prepared statement is forgotten, so it must be recreated before being used again.
This also means that a single prepared statement cannot be used by multiple simultaneous
database clients; however, each client can create their own prepared statement to use.
@@ -31,11 +30,10 @@ the statement is relatively simple to plan and rewrite but relatively
expensive to execute, the performance advantage of prepared statements
will be less noticeable. If a prepared statement is executed enough times, the server may eventually decide to save
and re-use a generic plan rather than re-planning each time. This will occur immediately if
diff --git a/gpdb-doc/dita/ref_guide/sql_commands/REASSIGN_OWNED.xml b/gpdb-doc/dita/ref_guide/sql_commands/REASSIGN_OWNED.xml
index 17e15c5a81..15a227b333 100644
--- a/gpdb-doc/dita/ref_guide/sql_commands/REASSIGN_OWNED.xml
+++ b/gpdb-doc/dita/ref_guide/sql_commands/REASSIGN_OWNED.xml
@@ -12,6 +12,7 @@
The The The The The
Members of
The dump file produced by
The database activity of
Because