Merging Concatenating JSON(B) columns in query
Using Postgres 9.4, I am looking for a way to merge two (or more) json or jsonb columns in a query. Consider the following table as an example: id | json1 | json2 ---------------------------------------- 1 | {'a':'b'} | {'c':'d'} 2 | {'a1':'b2'} | {'f':{'g' : 'h'}} Is it possible to have the query return the following: id | json ---------------------------------------- 1 | {'a':'b', 'c':'d'} 2 | {'a1':'b2', 'f':{'g' : 'h'}} Unfortunately, I can't define a function as described here . Is this possible with a "traditional" query? Here is the complete list of build-in functions that can be used