ProvSQL SQL API
Adding support for provenance and uncertainty management to PostgreSQL databases
Loading...
Searching...
No Matches
Circuit introspection

Functions for examining the structure of provenance circuits, used by visualization and where-provenance features. More...

Types

TYPE  provsql.GATE_WITH_DESC
 Row type for sub_circuit_with_desc results. More...
 

Functions

SETOF GATE_WITH_DESC provsql.sub_circuit_with_desc (UUID token, REGCLASS token2desc)
 Return the sub-circuit reachable from a token, with descriptions.
 
VOID provsql.identify_token (UUID token, OUT REGCLASS table_name, OUT INTEGER nb_columns)
 Identify which table and how many columns a provenance token belongs to.
 
TABLE provsql.sub_circuit_for_where (UUID token)
 Return the sub-circuit for where-provenance computation.
 

Detailed Description

Functions for examining the structure of provenance circuits, used by visualization and where-provenance features.

Function Documentation

◆ identify_token()

VOID provsql.identify_token ( UUID  token,
OUT REGCLASS  table_name,
OUT INTEGER  nb_columns 
)

Identify which table and how many columns a provenance token belongs to.

Searches all provenance-tracked tables for a row matching the given token and returns the table name and column count.

Parameters
tokenprovenance token to look up
table_name(OUT) the table containing this token
nb_columns(OUT) number of non-provenance columns in that table
Source code
provsql.sql line 882

◆ sub_circuit_for_where()

TABLE provsql.sub_circuit_for_where ( UUID  token)

Return the sub-circuit for where-provenance computation.

Similar to sub_circuit_with_desc but resolves input gates to their source table and column count for where-provenance evaluation.

Source code
provsql.sql line 917

◆ sub_circuit_with_desc()

SETOF GATE_WITH_DESC provsql.sub_circuit_with_desc ( UUID  token,
REGCLASS  token2desc 
)

Return the sub-circuit reachable from a token, with descriptions.

Recursively traverses the provenance circuit from the given token and returns all edges together with input gate descriptions from the mapping table.

Parameters
tokenroot provenance token
token2descmapping table providing descriptions for input gates