ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
Loading...
Searching...
No Matches
oj_syscol_ctx Struct Reference

Lower an outer JOIN of two tracked arms into the UNION-ALL of its matched and null-padded antijoin arms. More...

Public Attributes

Index r_idx
 left arm of the outer join being lowered
Index s_idx
 right arm
int sublevels_up
 current query nesting depth
bool found
 a whole-row or system-column reference to an arm

Detailed Description

Lower an outer JOIN of two tracked arms into the UNION-ALL of its matched and null-padded antijoin arms.

Fires only on a SELECT whose jointree->fromlist == [JoinExpr(JOIN_LEFT|JOIN_RIGHT|JOIN_FULL, RTR, RTR)], each arm a provenance-tracked base relation or non-LATERAL subquery, and where no Var references the join RTE directly (so no USING / NATURAL merged column). The subquery replaces the join's range-table slot and the two arm RTEs are neutralized. Everything else falls through unchanged: a chain of outer joins, an outer join beside other FROM items, an untracked arm. What falls through with a tracked relation on a null-padded side is refused by check_unlowered_outer_joins; a join whose padded side is untracked is sound as it stands.

Returns
true if the query was rewritten.

Context for oj_syscol_walker.

Definition at line 15754 of file provsql.c.

Member Data Documentation

◆ found

bool oj_syscol_ctx::found

a whole-row or system-column reference to an arm

Definition at line 15758 of file provsql.c.

◆ r_idx

Index oj_syscol_ctx::r_idx

left arm of the outer join being lowered

Definition at line 15755 of file provsql.c.

◆ s_idx

Index oj_syscol_ctx::s_idx

right arm

Definition at line 15756 of file provsql.c.

◆ sublevels_up

int oj_syscol_ctx::sublevels_up

current query nesting depth

Definition at line 15757 of file provsql.c.


The documentation for this struct was generated from the following file:
  • /home/senellar/git/software/provsql/src/provsql.c