↑↓ select ↵ open ⌫ change scope Open full search

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

Functions / Aggregate Functions

Collects all the input values, including nulls, into an array.

Reading PG 18current·documented in 19 of 27 versions, 8.4 to 20

Signatures & examples

array_agg ( anynonarray ORDER BY input_sort_columns ) → anyarray
Collects all the input values, including nulls, into an array.
array_agg ( anyarray ORDER BY input_sort_columns ) → anyarray
Concatenates all the input arrays into an array of one higher dimension. (The inputs must all have the same dimensionality, and cannot be empty or null.)
Version history 5
  1. 16 → 17 changed
  2. 12 → 13 changed
  3. 9.4 → 9.5 changed
  4. 8.4 → 9.0 changed
  5. 8.3 → 8.4 added

Definition snapshot: b7bd9cda · English manual source