I have a TEXT column that actually contains a stringized JSON. Now I just want to convert it to a real JSONB. How to do this from psql
console?
If all data is valid JSON, then this should work:
ALTER TABLE mytable ALTER COLUMN mytext_col TYPE jsonb USING mytext_col::jsonb;