![]() |
ProvSQL SQL API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
Functions that build provenance circuit gates for semiring operations. More...
Functions | |
| UUID | provsql.provenance_times (UUID[] tokens) |
| Create a times (product) gate from multiple provenance tokens. | |
| UUID | provsql.provenance_monus (UUID token1, UUID token2) |
| Create a monus (difference) gate from two provenance tokens. | |
| UUID | provsql.provenance_project (UUID token, INT[] positions) |
| Create a project gate for where-provenance tracking. | |
| UUID | provsql.provenance_eq (UUID token, INT pos1, INT pos2) |
| Create an equijoin gate for where-provenance tracking. | |
| UUID | provsql.provenance_plus (UUID[] tokens) |
| Create a plus (sum) gate from an array of provenance tokens. | |
| UUID | provsql.provenance_cmp (UUID left_token, OID comparison_op, UUID right_token) |
| Create a comparison gate for HAVING clause provenance. | |
Functions that build provenance circuit gates for semiring operations.
These are called internally by the query rewriter.
| UUID provsql.provenance_cmp | ( | UUID | left_token, |
| OID | comparison_op, | ||
| UUID | right_token | ||
| ) |
Create a comparison gate for HAVING clause provenance.
| left_token | provenance token for the left operand |
| comparison_op | OID of the comparison operator |
| right_token | provenance token for the right operand |
| UUID provsql.provenance_eq | ( | UUID | token, |
| INT | pos1, | ||
| INT | pos2 | ||
| ) |
Create an equijoin gate for where-provenance tracking.
| token | child provenance token |
| pos1 | attribute index in the first relation |
| pos2 | attribute index in the second relation |
| UUID provsql.provenance_monus | ( | UUID | token1, |
| UUID | token2 | ||
| ) |
Create a monus (difference) gate from two provenance tokens.
Implements m-semiring monus. Returns token1 if token2 is NULL (used for LEFT OUTER JOIN semantics in the EXCEPT rewriting).
| UUID provsql.provenance_plus | ( | UUID[] | tokens | ) |
Create a plus (sum) gate from an array of provenance tokens.
Filters out NULL and zero-gates; returns gate_zero() if all tokens are trivial, or a single token if only one remains.
| UUID provsql.provenance_project | ( | UUID | token, |
| INT[] | positions | ||
| ) |
Create a project gate for where-provenance tracking.
Records the mapping between input and output attribute positions.
| token | child provenance token |
| positions | array encoding attribute position mappings |
| UUID provsql.provenance_times | ( | UUID[] | tokens | ) |
Create a times (product) gate from multiple provenance tokens.
Filters out NULL and one-gates; returns gate_one() if all tokens are trivial, or a single token if only one remains.