Postgres Aggregate Into Array Methods In C