See also about the aggregate
function json_agg which aggregates record
- values as JSON efficiently.
+ values as JSON efficiently, and the aggregate function
+ json_object_agg, which aggregates pairs of values
+ into a JSON object.
The aggregate functions array_agg,
json_agg,
+ json_object_agg,
string_agg,
and xmlagg, as well as similar user-defined
aggregate functions, produce meaningfully different result values