On Tuesday, January 14, 2020, João Haas <joao.ca.h...@gmail.com> wrote: > > SELECT tb.*, array_agg(conn.child_id), array_agg(conn.kind) > > Create a custom type (using row(...) might work...?) with the relevant fields and “...array_agg((child_id, kind)::custom_type order by ...”?
David J.