CREATE AGGREGATE array_cat - Mailing list pgsql-hackers

From Vlad Bokov
Subject CREATE AGGREGATE array_cat
Date
Msg-id 89b89b20-27ea-8079-d3c0-3127d7f68ec4@razum2um.me
Whole thread Raw
Responses Re: CREATE AGGREGATE array_cat  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers
Hi, I wonder why there's no function to aggregate arrays by
concatenation out of the box?

There is a usual function `array_cat(anyarray, anyarray)`, but it
doesn't seamlessly work with grouping.

Wouldn't it be natural to have this:

CREATE AGGREGATE array_cat (anyarray)
(
    sfunc = array_cat,
    stype = anyarray,
    initcond = '{}'
);

Thanks,
Vlad





pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: remove spurious CREATE INDEX CONCURRENTLY wait
Next
From: Pavel Stehule
Date:
Subject: Re: pl/pgsql feature request: shorthand for argument and local variable references