Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@sheeju
Forked from ryandotsmith/agg.sql
Created April 16, 2018 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sheeju/387d23e3609eb0a7f7997d1b99fea9c0 to your computer and use it in GitHub Desktop.
Save sheeju/387d23e3609eb0a7f7997d1b99fea9c0 to your computer and use it in GitHub Desktop.
Postgres array concatenation aggregate function.
CREATE AGGREGATE array_accum (anyarray)
(
sfunc = array_cat,
stype = anyarray,
initcond = '{}'
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment