PostgreSQL - Rename database

后端 未结 6 879
感情败类
感情败类 2020-12-23 02:27

I need to rename the database but when I do in PGAdmin : ALTER DATABASE \"databaseName\" RENAME TO \"databaseNameOld\" it told me that it cannot.

How c

6条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-23 03:17

    Try not quoting the database name:

    ALTER DATABASE people RENAME TO customers;
    

    Also ensure that there are no other clients connected to the database at the time. Lastly, try posting the error message it returns so we can get a bit more information.

提交回复
热议问题