PostgreSQL 9.4.1(使用 homebrew 安装)我想重命名数据库。我正在这样做:
$ psql postgres
postgres=# ALTER DATABASE snot RENAME TO snortdb
postgres-# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
--------+-----------+-----------+---------+-------+-------------------------
postgres| myUser | SQL_ASCII | C | C |
snot | snort | SQL_ASCII | C | C |
template0| myUser | SQL_ASCII | C | C | =c/myUser +
| | | | | myUser=CTc/myUser
template1| myUser | SQL_ASCII | C | C | =c/myUser +
| | | | | myUser=CTc/myUser
如您所见,名称没有改变。我做错了什么?实际上,为什么=更改为-执行‘ALTER DATABASE’命令后?那是什么意思?
答案1
查询后缺少分号(;)吗?