Skip to content

Instantly share code, notes, and snippets.

@tkalfigo
Forked from ryandotsmith/agg.sql
Created September 29, 2017 19:49
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 tkalfigo/76401e585883ee8b4117fcb0d33817c3 to your computer and use it in GitHub Desktop.
Save tkalfigo/76401e585883ee8b4117fcb0d33817c3 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