Re: has_database_privilege is true? - Mailing list pgsql-general

From Stephen Frost
Subject Re: has_database_privilege is true?
Date
Msg-id 20200823142834.GM29590@tamriel.snowman.net
Whole thread Raw
In response to has_database_privilege is true?  (Paul Förster <paul.foerster@gmail.com>)
Responses Re: has_database_privilege is true?
List pgsql-general
Greetings,

* Paul Förster (paul.foerster@gmail.com) wrote:
> I create a role "test" and it can't (intentionally) login. But why does has_database_privilege() return true if
"test"can't connect to the cluster and can't use any database? Is this a bug or am I doing something strange here? Any
ideas?

The role attribute system (where you see 'cannot login') is largely
independent from the GRANT system (which is what has_database_privilege
is checking).  Both are required for a user to log in.

Thanks,

Stephen

Attachment

pgsql-general by date:

Previous
From: Paul Förster
Date:
Subject: has_database_privilege is true?
Next
From: Paul Förster
Date:
Subject: Re: has_database_privilege is true?