Renaming a Column: the TO
Clause
The TO
keyword with a new identifier renames an existing column.The table must not have an existing column that has the same identifier.
It will not be possible to change the name of a column that is included in any constraint: primary key, unique key, foreign key, or CHECK
constraints of the table.
Renaming a column will also be disallowed if the column is used in any stored PSQL module or view.