final class PolicyRule
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.

Lowers row security policies.

Rule: PG-POLICY-LOWER-001. Scope: CreatePolicyStmt, AlterPolicyStmt, RowSecurityOptionalExpr, RowSecurityOptionalWithCheck, RowSecurityDefaultToRole, RowSecurityOptionalToRole, RowSecurityDefaultPermissive, RowSecurityDefaultForCmd, row_security_cmd. Termination: no recursion of its own. Source: https://www.postgresql.org/docs/17/sql-createpolicy.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe hub
public function create(Node $statement): CreatePolicy

Lowers CreatePolicyStmt.

The word after AS is an identifier that the grammar action of RowSecurityDefaultPermissive in gram.y compares with permissive and restrictive; any other word is a syntax error there.

Parameters

$statementNode

Throws

ImplementationGap When the production has no rule
AnalysisException When the word after AS is neither permissive nor restrictive
Test cases 2
Called from 1
Calls 9
public function alter(Node $statement): AlterPolicy
public function command(Node $command): PolicyCommand

Private surface 2§

Implementation details, listed for orientation only.

private const COMMANDS = ['row_security_cmd: ALL' => \SqlSemantics\Platform\PostgreSql\Statement\Table\P…
private Lowering $lowering

Test cases 6§

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

Dedicated tests 6

Relations§

Instantiated in 2
Method calls 2