classDefaultPrivilegeChecks
final class DefaultPrivilegeChecks
Checks ALTER DEFAULT PRIVILEGES.
Rule: PG-DEFAULT-PRIVILEGES-CHECK-001. The server keeps one option for the schemas and one for the roles: IN SCHEMA or FOR ROLE given twice is "conflicting or redundant options". The privileges are checked against the kind of object without column lists (PG-PRIVILEGE-CHECK-001). Default privileges for schemas cannot be limited to schemas. PUBLIC is not a role whose future objects can be named, and cannot receive the right to grant. Termination: one pass over finite lists. Source: https://www.postgresql.org/docs/17/sql-alterdefaultprivileges.html. Status: Implemented.
Methods§
public function check(
Derivation $derivation,
list<DefaultScope> $scopes,
DefaultGrant|DefaultRevoke $action,
): voidReports the problems of the limiting clauses and of the action.
Parameters
$derivation | Derivation | |
$scopes | list<DefaultScope> | |
$action | DefaultGrant|DefaultRevoke |
Called from 1
Calls 12
- method-call RoleChecks::existing() line 44
- new RoleChecks line 44
- class-const DefaultObjectKind::Schemas() line 46
- method-call Derivation::report() line 47
- new AccessProblem line 47
- class-const AccessProblemRule::DefaultSchemasInSchema() line 47
- function-call
countline 50 - function-call
array_uniqueline 50 - class-const AccessProblemRule::RedundantOptions() line 51
- new PrivilegeChecks line 53
- method-call PrivilegeChecks::privileges() line 54
- method-call PrivilegeChecks::grantOption() line 56
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.