0

What does it mean if \l shows no database privileges for any user whatsoever on a certain database, but, has_database_privilege() confirms ALL privileges are present for a certain role (which is validated by the fact that the role can indeed connect to the database). Is this even a possible situation? Happening on version 10.15.

1
  • Please post your shell/terminal session. Where you specifying /l? What login are you using? Commented Mar 13, 2021 at 1:46

1 Answer 1

1

If \l shows absolutely no privileges information for a database, it means that the database has default privileges. The default is for PUBLIC to have CONNECT and TEMP (but not CREATE).

has_database_privilege will count privileges of PUBLIC as being possessed by any named user, so it may show 'true' even though \l doesn't explicitly list them.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.