Reputation: 1625
There's a column in my database that's a text column that should be an array column. All of the values of that column are valid Postgres arrays (since they were taken as text values from a Postgres array column) with format like {valuea,valueb}
. I need them as array values however, so how do I convert them back to array values?
Upvotes: 0
Views: 145
Reputation: 31666
You may use ALTER TABLE.. ALTER COLUMN
with the USING
option
alter table t alter column col type text[] using col::text[];
Upvotes: 1