↑↓ select ↵ open ⌫ change scope Open full search

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

System Catalogs / System catalogs

pg_aggregate

Read the PG 18 manual

The catalog pg_aggregate stores information about aggregate functions.

Reading PG 18current·documented in 24 of 24 versions, 7.4 to 20

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

Columns 22

As listed in the PostgreSQL 18 manual.

ColumnTypeDescription / reference
aggfnoidregprocNOT NULLpg_proc OID of the aggregate function
pg_proc.oid
aggkindcharNOT NULLAggregate kind: n for “normal” aggregates, o for “ordered-set” aggregates, or h for “hypothetical-set” aggregates
aggnumdirectargsint2NOT NULLNumber 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.
aggtransfnregprocNOT NULLTransition function
pg_proc.oid
aggfinalfnregprocNOT NULLFinal function (zero if none)
pg_proc.oid
aggcombinefnregprocNOT NULLCombine function (zero if none)
pg_proc.oid
aggserialfnregprocNOT NULLSerialization function (zero if none)
pg_proc.oid
aggdeserialfnregprocNOT NULLDeserialization function (zero if none)
pg_proc.oid
aggmtransfnregprocNOT NULLForward transition function for moving-aggregate mode (zero if none)
pg_proc.oid
aggminvtransfnregprocNOT NULLInverse transition function for moving-aggregate mode (zero if none)
pg_proc.oid
aggmfinalfnregprocNOT NULLFinal function for moving-aggregate mode (zero if none)
pg_proc.oid
aggfinalextraboolNOT NULLTrue to pass extra dummy arguments to aggfinalfn
aggmfinalextraboolNOT NULLTrue to pass extra dummy arguments to aggmfinalfn
aggfinalmodifycharNOT NULLWhether 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
aggmfinalmodifycharNOT NULLLike aggfinalmodify, but for the aggmfinalfn
aggsortopoidNOT NULLAssociated sort operator (zero if none)
pg_operator.oid
aggtranstypeoidNOT NULLData type of the aggregate function's internal transition (state) data
pg_type.oid
aggtransspaceint4NOT NULLApproximate average size (in bytes) of the transition state data, or zero to use a default estimate
aggmtranstypeoidNOT NULLData type of the aggregate function's internal transition (state) data for moving-aggregate mode (zero if none)
pg_type.oid
aggmtransspaceint4NOT NULLApproximate 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 8
  1. 18 → 19 reworded
  2. 10 → 11 changed
  3. 9.6 → 10 reworded
  4. 9.5 → 9.6 changed
  5. 9.3 → 9.4 changed
  6. 8.4 → 9.0 reworded
  7. 8.1 → 8.2 reworded
  8. 8.0 → 8.1 changed

Definition snapshot: english-manuals:f515adc138e13420ec6c9c01205… · English manual source