Timeline for Created user can access all databases in PostgreSQL without any grants
Current License: CC BY-SA 3.0
3 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 13, 2012 at 13:53 | comment | added | kgrittn |
A user can only connect to databases as allowed by pg_hba.conf. That includes not only the combination of user and database, but also the host from which they're connecting and the method of authentication allowed. If you don't need that granularity of control, the GRANT /REVOKE technique discussed in other answers is probably easier. For one thing, you just need a superuser database connection for that, versus needing an OS login which can edit the file.
|
|
May 13, 2012 at 13:29 | comment | added | mikeplate | Thanks! I did look at the pg_hba.conf file but I was under the impression that it only governs how a user authenticates when connecting to a database and not what privileges the user has in that same database. | |
May 13, 2012 at 13:27 | history | answered | kgrittn | CC BY-SA 3.0 |