PostgreSQL - How to change data type of a column?
To alter the data type of an existing column in a PostgreSQL table:
ALTER TABLE table_name ALTER COLUMN column_name TYPE new_type;
Example:
ALTER TABLE actors ALTER COLUMN phone_number TYPE integer;
Need a good GUI Tool for PostgreSQL? TablePlus is a modern, native tool with an elegant UI that allows you to simultaneously manage multiple databases such as MySQL, PostgreSQL, SQLite, Microsoft SQL Server and more.