SYSAGGREGATES

The sysaggregates system catalog table records user-defined aggregates (UDAs). The sysaggregates table has the following columns.
Table 1. SYSAGGREGATES table column descriptions

Column Type Explanation
name VARCHAR(128) Name of the aggregate
owner CHAR(32) Name of the owner of the aggregate
aggid SERIAL Unique code identifying the aggregate
init_func VARCHAR(128) Name of initialization UDR
iter_func VARCHAR(128) Name of iterator UDR
combine_func VARCHAR(128) Name of combine UDR
final_func VARCHAR(128) Name of finalization UDR
handlesnulls BOOLEAN NULL-handling indicator:
  • t = handles NULLs
  • f = does not handle NULLs

Each user-defined aggregate has one entry in sysaggregates that is uniquely identified by its identifying code (the aggid value). Only user-defined aggregates (aggregates that are not built in) have entries in sysaggregates.

Both a simple index on the aggid column and a composite index on the name and owner columns require unique values.