4 ms·
You can’t select * into json_agg
by teej 7y ago
You can’t select * into json_agg
- striking 7y agoDoes SELECT json_agg(row_to_json(*)) work?
- newaccoutnas 7y agoThere's also json_build_object for building a JSON object and then you can use json_agg inside that.
- eddyg 7y agoselect array_to_json(array_agg(row_to_json(t))) from (select * from name) t seems to work...