Aggregate Array

From PostgreSQL wiki

Revision as of 11:26, 25 April 2013 by Ppkrauss (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The buildin array_agg() have different behaviour, here using array_cat().

array_aggcat(anyelement)

Snippets

Aggregate array

Works with PostgreSQL

Any version

Written in

SQL

Depends on

Nothing

This snippet is also part of the ulib_agg user-defined library.

CREATE AGGREGATE array_aggcat (anyelement)
(   sfunc = array_cat,
    stype = anyarray,
    initcond = '{}'
);
Personal tools