![]() |
ProvSQL SQL API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
Functions for building and evaluating aggregate (GROUP BY) provenance, including the δ-semiring operator and semimodule multiplication. More...
Functions | |
| UUID | provsql.provenance_delta (UUID token) |
| Create a δ-semiring gate wrapping a provenance token. | |
| AGG_TOKEN | provsql.provenance_aggregate (INTEGER aggfnoid, INTEGER aggtype, ANYELEMENT val, UUID[] tokens) |
| Build an aggregate provenance gate from grouped tokens. | |
| UUID | provsql.provenance_semimod (ANYELEMENT val, UUID token) |
| Create a semimodule scalar multiplication gate. | |
Functions for building and evaluating aggregate (GROUP BY) provenance, including the δ-semiring operator and semimodule multiplication.
| AGG_TOKEN provsql.provenance_aggregate | ( | INTEGER | aggfnoid, |
| INTEGER | aggtype, | ||
| ANYELEMENT | val, | ||
| UUID[] | tokens | ||
| ) |
Build an aggregate provenance gate from grouped tokens.
Called internally by the query rewriter for GROUP BY queries. Creates an agg gate linking all contributing tokens and records the aggregate function OID and the computed scalar value.
| aggfnoid | OID of the SQL aggregate function |
| aggtype | OID of the aggregate result type |
| val | computed aggregate value |
| tokens | array of provenance tokens being aggregated |
| UUID provsql.provenance_delta | ( | UUID | token | ) |
Create a δ-semiring gate wrapping a provenance token.
Used internally for aggregate provenance. Returns the token unchanged if it is gate_zero() or gate_one(), and gate_one() if the token is NULL.
| UUID provsql.provenance_semimod | ( | ANYELEMENT | val, |
| UUID | token | ||
| ) |
Create a semimodule scalar multiplication gate.
Pairs a scalar value with a provenance token, used internally by the query rewriter for aggregate provenance.
| val | the scalar value |
| token | the provenance token to multiply |