1
I have the following problem:
I have a table with N columns, however, I would like to turn almost all of them into a single json column, e.g.:
id,
json(col2,col3,col4) as dados
I looked at the documentation, and I found a command that does something similar put in the whole table:
SELECT
array_to_json(array_agg(tab_1))
FROM
tab_1
Does anyone have any idea how I might be solving this?
Thank you very much!!
– Rodrigo Santos