Boost your PostgreSQL expertise with this curated set of 30 multiple-choice questions on user management and security. Learn about roles, permissions, privileges, and security best practices to ensure database protection.
pg_hba.conf file?
| Qno | Answer |
|---|---|
| 1 | A) CREATE ROLE <role_name>; |
| 2 | C) Both A and B |
| 3 | A) WITH LOGIN |
| 4 | D) DROP ROLE <role_name>; |
| 5 | B) ALTER ROLE <role_name>; |
| 6 | A) Allows roles to inherit permissions |
| 7 | B) ALTER ROLE <role_name> WITH INHERIT; |
| 8 | A) It inherits all granted privileges |
| 9 | A) Assign SUPERUSER attribute |
| 10 | A) ALTER ROLE <role_name> INHERIT; |
| 11 | C) GRANT <permissions> ON <table_name> TO <role_name>; |
| 12 | B) REVOKE <privilege> ON <object> FROM <role_name>; |
| 13 | C) Allows the role to grant the privilege to others |
| 14 | B) \dp <table_name> in psql |
| 15 | A) Grants all privileges |
| 16 | B) REVOKE ALL ON <table_name> FROM <role_name>; |
| 17 | B) UPDATE |
| 18 | A) Yes |
| 19 | C) REVOKE ALL PRIVILEGES BY <role_name>; |
| 20 | A) CREATE |
| 21 | B) SUPERUSER |
| 22 | A) Centralized management of permissions |
| 23 | A) Use SSL/TLS encryption |
| 24 | B) To configure database authentication |
| 25 | D) All of the above |
| 26 | B) To detect unauthorized access |
| 27 | B) SET password_encryption TO ‘scram-sha-256’; |
| 28 | A) Remove or restrict default roles |
| 29 | A) log_connections |
| 30 | D) All of the above |