final class RoleChecks
Restricted visibility: declared "@visibility SqlSemantics\Platform\PostgreSql". Code outside that scope must not name this declaration.

Checks the roles and role options of the role commands.

Rule: PG-ROLE-CHECK-001. The checks need no declaration: roles are not declarations a context holds, so whether a named role exists is never reported. Reported, in the words of the server: an option of the server filled twice ("conflicting or redundant options"; SYSID fills none), an option word outside the attribute list, UNENCRYPTED PASSWORD, a connection limit below -1, a role name starting with pg_ where a role is created or altered, PUBLIC where an existing role is required (PUBLIC is not a role), and any designation other than a name in DROP ROLE. CURRENT_ROLE, CURRENT_USER and SESSION_USER depend on the session and are not checked. Termination: one pass over a finite list. Source: https://www.postgresql.org/docs/17/sql-createrole.html, https://www.postgresql.org/docs/17/sql-alterrole.html, https://www.postgresql.org/docs/17/sql-droprole.html, https://www.postgresql.org/docs/17/user-manag.html. Status: Implemented.

Methods§

public function existing(Derivation $derivation, list<RoleSpec> $roles): void

Reports PUBLIC where existing roles are required.

Parameters

$derivationDerivation
$roleslist<RoleSpec>
Called from 9
Calls 4
public function droppable(Derivation $derivation, list<RoleSpec> $roles): void

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Instantiated in 11
Method calls 14