我正在尝试创建一个只能访问一个数据库的用户。它告诉我数据库不存在,但很明显它通过以下方式存在。
postgres=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | ICU Locale | Locale Provider | Access privileges
-----------+----------+----------+---------+---------+------------+-----------------+-----------------------
GarsDB | postgres | UTF8 | C.UTF-8 | C.UTF-8 | | libc |
postgres | postgres | UTF8 | C.UTF-8 | C.UTF-8 | | libc |
template0 | postgres | UTF8 | C.UTF-8 | C.UTF-8 | | libc | =c/postgres +
| | | | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | C.UTF-8 | C.UTF-8 | | libc | =c/postgres +
| | | | | | | postgres=CTc/postgres
(4 rows)
postgres=# grant all privileges on database GarsDB to gars;
ERROR: database "garsdb" does not exist
postgres=# grant all privileges on database garsdb to gars;
ERROR: database "garsdb" does not exist
postgres=#
任何想法可能会发生什么?我最近才使用 Postgres。