I made a mistake designing my schema. I made a column jsonb when it should have been jsonb[]. Is there a way to cast/convert the data to jsonb[]?
The data in the column is a jsonb array of text elements, it just happens to be cast as jsonb instead of jsonb[].
Something like:
select
jsonb_to_jsonb_array(jsonb_col)
from
mytable
The larger goal is get the column into a plain pg text array text[] such that it can be unnested. I understand how to do this with jsonb[] but am running into issues with jsonb.
jsonb[]is probably a bad choice, read this answer.text[]. Of course, this is your choice. Anyway, you've been warned.