3 ms·
The most useful part of JSON support is making your query return data from multiple joins and sub-queries in one field. Then you can just json decode the result
by arkh 8y ago
The most useful part of JSON support is making your query return data from multiple joins and sub-queries in one field. Then you can just json decode the result instead of fetching tons of rows. You could already do that with xmlagg but nowadays people like their JSON.
> SELECT a.id, JSONB_AGG(b.id) AS b_id FROM a, b GROUP BY a.id