I tried to do it like in the following example, but I get an error saying the column already exists:
Code: Select all
dbadmin=> create table t (Capital_Letter int);
CREATE TABLE
dbadmin=> \d t;
List of Fields by Tables
Schema | Table | Column | Type | Size | Default | Not Null | Primary Key | Foreign Key
----------+-------+----------------+------+------+---------+----------+-------------+-------------
testdb01 | t | Capital_Letter | int | 8 | | f | f |
(1 row)
dbadmin=> alter table t rename column Capital_Letter to capital_letter;
ROLLBACK 2662: Column name "capital_letter" already exists