![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
SQL function provsql.where_provenance() – column-level provenance.
More...
#include "postgres.h"#include "fmgr.h"#include "catalog/pg_type.h"#include "utils/uuid.h"#include "executor/spi.h"#include "utils/builtins.h"#include "provsql_shmem.h"#include "provsql_utils.h"#include <algorithm>#include <utility>#include <sstream>#include "WhereCircuit.h"#include "provsql_utils_cpp.h"
Go to the source code of this file.
Functions | |
| static vector< pair< int, int > > | parse_array (string s) |
| Parse a PostgreSQL text representation of an array of integer pairs. | |
| static string | where_provenance_internal (Datum token) |
Build a JSON where-provenance description for the circuit rooted at token. | |
| Datum | where_provenance (PG_FUNCTION_ARGS) |
| PostgreSQL-callable wrapper for where_provenance(). | |
SQL function provsql.where_provenance() – column-level provenance.
Implements provsql.where_provenance(), which evaluates the where-provenance of a query result tuple. Where-provenance identifies the base-relation cells (table, row, column) from which each output value was copied.
The function builds a WhereCircuit from the mmap-backed circuit store (using SPI to obtain gate information), evaluates it via WhereCircuit::evaluate(), and returns the result as a PostgreSQL text-array value containing "table.tid.position" locator strings.
Definition in file where_provenance.cpp.
|
static |
Parse a PostgreSQL text representation of an array of integer pairs.
| s | String in the form {{a,b},{c,d},...}. |
Definition at line 44 of file where_provenance.cpp.

| Datum where_provenance | ( | PG_FUNCTION_ARGS | ) |
PostgreSQL-callable wrapper for where_provenance().
Definition at line 169 of file where_provenance.cpp.

|
static |
Build a JSON where-provenance description for the circuit rooted at token.
| token | Datum containing the root provenance gate UUID. |
Definition at line 76 of file where_provenance.cpp.

