PostgreSQL 9.2 – Convert TEXT json string to type json/hstore

SELECT cast(settings AS json) from users;

EDIT 7 years later

I highly suggest that you don’t use unstructured columns unless your data is unstructured. RDBMS go a very long way. We built a fairly large platform and used user settings as a json column, and it endedup becoming a junk drawer which needed to be cleaned up many years later

Leave a Comment