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

Tells which FROM items a lateral item on the right of a join may reference.

Rule: PG-LATERAL-JOIN-001. A lateral item (a function call, XMLTABLE, JSON_TABLE or a LATERAL subquery) on the right of a join sees the items on the left of the join. When the join is RIGHT or FULL, those items are still visible, but referencing one of them is an error: transformFromClauseItem marks them p_lateral_ok = false and check_lateral_ref_ok reports "invalid reference to FROM-clause entry for table" as soon as a column, a qualifier or a whole row reaches one. Such a relation carries the BARRED entry in its hidden list for the lateral item only. The name reported is the alias, the relation name, unnamed_subquery or unnamed_join. Source: https://www.postgresql.org/docs/17/queries-table-expressions.html#QUERIES-LATERAL. Termination: one pass over the relations of each level. Status: Implemented.

Constants§

public const BARRED = -2

The hidden-list entry that marks a relation a lateral item sees but must not reference.

Methods§

public function reached(
    Environment $environment,
    Resolution $resolution,
    ?QualifiedName $qualifier,
): ?VisibleRelation

Test cases 4§

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

Dedicated tests 4

Relations§

Instantiated in 3
Method calls 5