PG_AGGREGATE
PG_AGGREGATE records information about aggregate functions. Each entry in PG_AGGREGATE is an extension of an entry in PG_PROC. The PG_PROC entry carries the aggregate's name, input and output data types, and other information that is similar to ordinary functions.
| Name | Type | Reference | Description |
|---|---|---|---|
| aggfnoid | regproc | proname in PG_PROC | PG_PROC proname of the aggregate function |
| aggtransfn | regproc | proname in PG_PROC | Transition function |
| aggcollectfn | regproc | proname in PG_PROC | Collect function |
| aggfinalfn | regproc | proname in PG_PROC | Final function (0 if none) |
| aggsortop | oid | oid in PG_OPERATOR | Associated sort operator (0 if none) |
| aggtranstype | oid | oid in PG_TYPE | Data type of the aggregate function's internal transition (state) data The possible values and their meanings are defined by the types in pg_type.h. The main two types are polymorphic (isPolymorphicType) and non-polymorphic. |
| agginitval | text | - | Initial value of the transition state. This is a text column containing the initial value in its external string representation. If this column is null, the transition state value starts from null. |
| agginitcollect | text | - | Initial value of the collection state. This is a text column containing the initial value in its external string representation. If this column is null, the collection state value starts from null. |
| aggkind | "char" | - | Type of the aggregate function:
|
| aggnumdirectargs | smallint | - | Number of direct parameters (non-aggregation-related parameters) of the aggregate function of the ordered set aggregate type. For an aggregate function of the normal aggregate type, the value is 0. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.