Aggregates

Aggregate functions in PostgreSQL are expressed as state values and state transition functions. That is, an aggregate can be defined in terms of state that is modified whenever an input item is processed. To define a new aggregate function, one selects a data type for the state value, an initial value for the state, and a state transition function. The state transition function is just an ordinary function that could also be used outside the context of the aggregate. A final function can also be specified, in case the desired result of the aggregate is different from the data that needs to be kept in the running state value.

Just simply click -> Aggregate to open an object pane for Aggregate. A right-click displays the popup menu or using the object pane toolbar below, allowing you to create new, edit and delete the selected aggregate.

Create Aggregate

To create a new aggregate

To create a new aggregate with modification as one of the existing aggregate

Edit Aggregate

To edit the existing aggregate (manage its properties etc)

To change the name of the aggregate

Note: Support from PostgreSQL 7.4 or later.

Delete Aggregate

To delete an aggregate

Achieve Aggregate Information

To achieve an aggregate information (OID, Aggregate Schema, Arguments and DDL, etc)