I have a jsonb column that is used to store an array of value:
["value1", "value2", "value3"]
I would like to concatenate the values inside that array with the value of another column, such as instead of having:
string column | jsonb column
--------------+-------------------------------
mystring | ["value1", "value2", "value3"]
I can have:
string + jsonb
------------------------------------
mystring, value1, value2, value3
I naively tried using jsonb_array_elements to no avail.
SELECT string_column || ', ' || jsonbvalues
FROM mytable, jsonb_array_elements(mytable.jsonb_column) as jsonbvalues
Could someone indicate what the correct syntax is?