PostgreSQL - how to rename CamelCase column? When I tried to rename a CamelCase column like this:

ALTER TABLE mytable RENAME COLUMN camelCaseColumn TO camel_case_column;


I get the following error:

ERROR: column "camelcasecolumn" does not exist


Surrounding the CamelCase column name with single quotes like this:

ALTER TABLE mytable RENAME COLUMN 'camelCaseColumn' TO camel_case_column;


gives me a syntax error.

Is there any way I can rename the column? Or do I have to create a new table and transfer the data?

The database is running on Ubuntu, and I am using Mac OS X to ssh into the server where the database is running on to issue the ALTER TABLE commands. I know that Mac OS X is case insensitive, so could this be part of the problem?

Thanks!
Turns out that using double quotes works:

ALTER TABLE mytable RENAME COLUMN "camelCaseColumn" TO camel_case_column;