Integer aggregator and enumerator functions
intagg
extension provides integer aggregation and enumeration functions, which are useful for working with integer arrays and creating sequences. This extension is particularly helpful when you need to aggregate integer values or generate enumerated lists.
Your Nile database arrives with the intagg
extension already enabled.
int_array_aggregate(integer)
- Aggregates integers into an arrayint_array_enum(integer[])
- Creates a set of integers from an arrayint_array_enum
function unnesting aggregated arrays into rows. It is the opposite of int_array_aggregate
.
array_agg()
for general-purpose array aggregationgenerate_series()
for generating sequencesunnest()
for array expansionintagg
extension is here and includes a nice example of
using the intagg
functions to denormalize data and still be able to query it in a normalized way.