New answers tagged

1

While there's still no way to do anything about the select all columns but one bit, but you can use json_agg(to_json(b.col_1, b.col_2, b.col_3 ...)) to get a json array of jsons each in the format {"col_1":"col_1 value", ...}. So the query would look something like: SELECT a.id, a.name, json_agg(to_json(b.col_1,b.col_2,b.col_3...)) as item FROM a ...



Top 50 recent answers are included