Postgresql granting a username to specific database
0
votes
1
answer
214
views
I'm trying to create a user that only has access to one database. It's telling me database doesn't exist but clearly it does by following.
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=#
Any ideas what could be going on? I've only been using Postgres recently.
Asked by Randy R
(103 rep)
Apr 12, 2023, 07:39 AM
Last activity: Apr 12, 2023, 07:56 AM
Last activity: Apr 12, 2023, 07:56 AM