pg_aggregate

The pg_aggregate catalog provides information about aggregate functions.

Column name Data type Description
aggfnoid regproc (references pg_proc.oid) The OID of an aggregate function.
aggkind char An aggregate kind.
The possible values are:
  • n – A normal aggregate.
  • o – An ordered-set aggregate.
  • h – A hypothetical-set aggregate.
aggnumdirectargs int2 The number of direct (non-aggregated) arguments for ordered-set or hypothetical-set aggregates.
Always 0 for normal aggregates.
aggtransfn regproc A transition function.
aggfinalfn regproc A final function.
0 – None.
aggcombinefn regproc A combine function.
0 – None.
aggserialfn regproc A serialization function.
0 – None.
aggdeserialfn regproc A deserialization function.
0 – None.
aggmtransfn regproc A forward transition function for the moving-aggregate mode.
0 – None.
aggminvtransfn regproc An inverse transition function for the moving-aggregate mode.
0 – None.
aggmfinalfn regproc A final function for the moving-aggregate mode.
0 – None.
aggfinalextra bool Specifies whether to pass extra dummy arguments to aggfinalfn (TRUE) or not (FALSE).
aggmfinalextra bool Specifies whether to pass extra dummy arguments to aggmfinalfn (TRUE) or not (FALSE).
aggfinalmodify char Specifies whether aggfinalfn modifies the transition state.
The possible values are:
  • r – Read-only.
  • c – Cannot apply aggtransfn afterward.
  • w – Writes to the state.
aggmfinalmodify char Specifies whether aggmfinalfn modifies the transition state.
The possible values are:
  • r – Read-only.
  • c – Cannot apply aggmfinalfn afterward.
  • w – Writes to the state.
aggsortop oid (references pg_operator.oid) An associated sort operator.
aggtranstype oid (references pg_type.oid) The data type of an internal transition state value.
aggtransspace int4 An approximate average size (in bytes) of a transition state.
0 – A default estimate.
aggmtranstype oid A transition state type for the moving-aggregate mode.
0 – None.
aggmtransspace int4 An approximate average size (in bytes) of the moving-aggregate transition state, or 0 for default.
agginitval text An initial transition state value in an external string form.
NULL – The state starts as NULL.
aggminitval text An initial transition state for the moving-aggregate mode.
NULL – The state starts as NULL.