postgresql – 无法删除数据库
发布时间:2020-12-13 16:22:34 所属栏目:百科 来源:网络整理
导读:我是PostgreSQL的新手,我遇到的问题是我认为是一个简单的命令DROP DATABASE和DROPDB.为什么以下命令不会删除我的数据库? postgres=# drop database clientmspostgres-# l List of databases Name | Owner | Encoding | Collate | Ctype | Access privilege
我是PostgreSQL的新手,我遇到的问题是我认为是一个简单的命令DROP DATABASE和DROPDB.为什么以下命令不会删除我的数据库?
postgres=# drop database clientms postgres-# l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges -----------+--------------+----------+-------------+-------------+----------------------- clientms | clientmsuser | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | postgres | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | template0 | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres (4 rows) postgres-# dropdb clientms postgres-# l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges -----------+--------------+----------+-------------+-------------+----------------------- clientms | clientmsuser | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | postgres | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | template0 | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres (4 rows)
你忘记了分号;在命令之后.尝试:
DROP DATABASE clientms; 不完整的命令也由提示符指示: – 而不是=.这是为了允许多行命令. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |