Editing Aggregate Properties

Owner
The owner of the aggregate function.

Note: Support from PostgreSQL 8.0 or later.

Input type
An input data type on which this aggregate function operates.

Note: Support from PostgreSQL 8.2 or later. For versions below 8.2, just select the Input type schema and Input type from the dropdown lists.

State type schema and State type
The data type for the aggregate's state value.

State function schema and State function
The state transition function to be called for each input row. For an N-argument aggregate function, the state function must take N+1 arguments, the first being of type state_data_type and the rest matching the declared input data type(s) of the aggregate. The function must return a value of type state_data_type. This function takes the current state value and the current input data value(s), and returns the next state value.

Final function schema and Final function
The final function called to compute the aggregate's result after all input rows have been traversed. The function must take a single argument of type state_data_type. The return data type of the aggregate is defined as the return type of this function. If final function is not specified, then the ending state value is used as the aggregate's result, and the return type is state_data_type.

Initial condition
The initial setting for the state value. This must be a string constant in the form accepted for the data type state_data_type. If not specified, the state value starts out null.

Sort operator schema and Sort operator
The associated sort operator for a MIN- or MAX-like aggregate. The operator is assumed to have the same input data types as the aggregate (which must be a single-argument aggregate).

Note: Support from PostgreSQL 8.1 or later.