Problem description
I execute the following SQL statement to modify a capitalized table name in my ApsaraDB RDS for PostgreSQL instance:
alter table testtable rename to TESTTABLE
The following error message is returned:
ERROR: relation "testtable" already exists
Causes
In ApsaraDB RDS for PostgreSQL, table names are not case-sensitive by default.
Solutions
Enclose a capitalized table name in double quotation marks ("). Example:
alter table testtable rename "TESTTABLE";
Note
You must use the capitalized table name for subsequent queries.
Applicable scope
ApsaraDB RDS for PostgreSQL