select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

SYSTEM CATALOGS / SYSTEM CATALOGS

The catalog pg_aggregate stores information about aggregate functions.

Kind
System catalogs
Columns in this snapshot
22
Definition source
English manual

Columns 22

ColumnTypeDescription / reference
aggfnoidregprocpg_proc OID of the aggregate function
pg_proc.oid
aggkindcharAggregate kind: n for “normal” aggregates, o for “ordered-set” aggregates, or h for “hypothetical-set” aggregates
aggnumdirectargsint2Number of direct (non-aggregated) arguments of an ordered-set or hypothetical-set aggregate, counting a variadic array as one argument. If equal to pronargs, the aggregate must be variadic and the variadic array describes the aggregated arguments as well as the final direct arguments. Always zero for normal aggregates.
aggtransfnregprocTransition function
pg_proc.oid
aggfinalfnregprocFinal function (zero if none)
pg_proc.oid
aggcombinefnregprocCombine function (zero if none)
pg_proc.oid
aggserialfnregprocSerialization function (zero if none)
pg_proc.oid
aggdeserialfnregprocDeserialization function (zero if none)
pg_proc.oid
aggmtransfnregprocForward transition function for moving-aggregate mode (zero if none)
pg_proc.oid
aggminvtransfnregprocInverse transition function for moving-aggregate mode (zero if none)
pg_proc.oid
aggmfinalfnregprocFinal function for moving-aggregate mode (zero if none)
pg_proc.oid
aggfinalextraboolTrue to pass extra dummy arguments to aggfinalfn
aggmfinalextraboolTrue to pass extra dummy arguments to aggmfinalfn
aggfinalmodifycharWhether aggfinalfn modifies the transition state value: r if it is read-only, s if the aggtransfn cannot be applied after the aggfinalfn, or w if it writes on the value
aggmfinalmodifycharLike aggfinalmodify, but for the aggmfinalfn
aggsortopoidAssociated sort operator (zero if none)
pg_operator.oid
aggtranstypeoidData type of the aggregate function's internal transition (state) data
pg_type.oid
aggtransspaceint4Approximate average size (in bytes) of the transition state data, or zero to use a default estimate
aggmtranstypeoidData type of the aggregate function's internal transition (state) data for moving-aggregate mode (zero if none)
pg_type.oid
aggmtransspaceint4Approximate average size (in bytes) of the transition state data for moving-aggregate mode, or zero to use a default estimate
agginitvaltextThe initial value of the transition state. This is a text field containing the initial value in its external string representation. If this field is null, the transition state value starts out null.
aggminitvaltextThe initial value of the transition state for moving-aggregate mode. This is a text field containing the initial value in its external string representation. If this field is null, the transition state value starts out null.
Column history across versions
Version history 5
  1. PG 18 → 19changed
  2. PG 10 → 11changed
  3. PG 9.6 → 10changed
  4. PG 9.5 → 9.6changed
  5. PG 9.3 → 9.4changed

Definition snapshot: english-manuals:809aefce3b143c9f0bccd2cccae… · English manual source