Instantly share code, notes, and snippets.

Embed
What would you like to do?
Postgres array concatenation aggregate function.
CREATE AGGREGATE array_accum (anyarray)
(
sfunc = array_cat,
stype = anyarray,
initcond = '{}'
);
@wmhilton

This comment has been minimized.

Show comment
Hide comment
@wmhilton

wmhilton Aug 29, 2015

This is awesome man!

wmhilton commented Aug 29, 2015

This is awesome man!

@tkalfigo

This comment has been minimized.

Show comment
Hide comment
@tkalfigo

tkalfigo Sep 29, 2017

Useful and works like a charm. Perhaps consider proposing on the pg-dev list to include it in future version.

tkalfigo commented Sep 29, 2017

Useful and works like a charm. Perhaps consider proposing on the pg-dev list to include it in future version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment