In PostgreSQL, how can I select some values ββin a 2D array?
For example, if I want to aggregate a data field into an array, I would use the ARRAY () constructor or the array_agg function, for example.
ARRAY(SELECT s.name FROM myschema.mytable s)
How can I select, say, two values, in a 2D array, i.e.
2DARRAYFUNCTION(SELECT s.name, s.id FROM ...)
source
share