intagg
integer aggregator and enumerator (obsolete)
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
intagg | 1.1 | FUNC | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 4970 | intagg | No | No | No | Yes | No | No | - |
| Related | topn quantile lower_quantile count_distinct omnisketch ddsketch tdigest first_last_agg |
|---|
Version
| PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|
| 1.1 | 1.1 | 1.1 | 1.1 | 1.1 |
Install
Note: This is a built-in contrib extension of PostgreSQL
CREATE EXTENSION intagg;
Usage
Provides an integer aggregator and enumerator. These are now wrappers around the built-in array_agg() and unnest() functions.
CREATE EXTENSION intagg;
Functions
| Function | Description |
|---|---|
int_array_aggregate(integer) | Aggregate integers into an array (wrapper for array_agg()) |
int_array_enum(integer[]) | Expand array into rows (wrapper for unnest()) |
Examples
-- Aggregate integers into an array
SELECT id_left, int_array_aggregate(id_right) AS rights
FROM many_to_many
GROUP BY id_left;
-- Expand an integer array into rows
SELECT int_array_enum(ARRAY[1, 2, 3, 4]);
-- Returns: 1, 2, 3, 4 (as separate rows)
Note: This module is obsolete. Use the built-in array_agg() and unnest() functions instead for new code.
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.