I have a json column, I want to select it as text, like :
select json_to_string(my_json_col) from my_table
How is that done ?
I would try:
SELECT CAST(my_json_col AS VARCHAR) FROM my_table
or
SELECT my_json_cal::varchar FROM my_table
(I haven't worked with JSON in PostgreSQL yet, but the above is how PostgreSQL handles type conversions)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With