Desafortunadamente, PostgreSQL realmente no es compatible con el estándar SQL MULTISET operador, ni conjuntos anidados en general. Podrías crear un ARRAY de ROW tipos como este:
select array[row(1, 2), row(3, 4)]
E incluso podrías anular la matriz anterior
select * from unnest(array[row(1, 2), row(3, 4)]) t(a int, b int)
Entonces, si un ARRAY de ROW es aceptable para usted, podría escribir algo como esto:
select array_agg(row(a, b))
from (
select ...
) t(a, b)
Si tienes tu propio OBJECT escriba en PostgreSQL, puede emitir el ROW anónimo a tu tipo:
select array_agg(row(a, b)::your_type)
from (
select ...
) t(a, b)