has_database_privilege is true?
От | Paul Förster |
---|---|
Тема | has_database_privilege is true? |
Дата | |
Msg-id | 6F69D6E8-6549-4C91-B756-42A27B98C312@gmail.com обсуждение исходный текст |
Ответы |
Re: has_database_privilege is true?
|
Список | pgsql-general |
Hi, I create a role "test" and it can't (intentionally) login. But why does has_database_privilege() return true if "test" can'tconnect to the cluster and can't use any database? Is this a bug or am I doing something strange here? Any ideas? I'm on PostgreSQL 12.4. Cheers, Paul postgres=# create role "test"; CREATE ROLE postgres=# \du test List of roles Role name | Attributes | Member of -----------+--------------+----------- test | Cannot login | {} postgres=# select has_database_privilege('test', 'postgres', 'connect'); has_database_privilege ------------------------ t (1 row) postgres=# select has_database_privilege('test', 'db01', 'connect'); has_database_privilege ------------------------ t (1 row) ... postgres=# select datname from pg_database; datname ----------- db02 template0 template1 postgres db01 (5 rows)
В списке pgsql-general по дате отправления: