Bird
0
0

You wrote this command to restrict user access:

medium📝 Debug Q14 of 15
PostgreSQL - Roles and Security
You wrote this command to restrict user access:
REVOKE SELECT ON employees FROM guest_user;
But guest_user still can SELECT data. What is the likely problem?
Aguest_user has SELECT permission through a role or group
BREVOKE command syntax is incorrect
Cguest_user is the database owner
DSELECT permission cannot be revoked
Step-by-Step Solution
Solution:
  1. Step 1: Understand REVOKE command effect

    REVOKE removes direct permissions from a user but does not affect permissions inherited from roles or groups.
  2. Step 2: Identify why guest_user still has access

    If guest_user belongs to a role or group with SELECT permission, they keep access despite the REVOKE.
  3. Final Answer:

    guest_user has SELECT permission through a role or group -> Option A
  4. Quick Check:

    Inherited permissions override REVOKE [OK]
Quick Trick: Check roles/groups for inherited permissions [OK]
Common Mistakes:
  • Assuming REVOKE always removes access
  • Thinking syntax is wrong without checking
  • Believing owners cannot lose permissions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes