This seems easy enough but I can't get the format correct. I have some rows like this:
alias # is character varying(20) column-type
------
Bob2
Judy5
Jane6
Erica7
I'd like to aggregate all these rows into 1 array:
[Bob2, Judy5, Jane6, Erica7]
I can only seem to get:
{(Bob2), (Judy5), (Jane6), (Erica7)}
SELECT array_agg(r) FROM (
SELECT name FROM mytable
) r
How can I get it to the format I'd like?