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

Register a tool, or replace the RECORD with the same logical name. More...

Topics

 Compiled semirings
 Reset the internal cache of OID constants used by the query rewriter.

Functions

VOID reset_constants_cache ()
 Reset the internal cache of OID constants used by the query rewriter.

Detailed Description

Register a tool, or replace the RECORD with the same logical name.

Functions and statements executed at extension load time to reset internal caches and create the constant zero/one gates.

Parameters
namelogical id (e.g. 'd4-jm62300'); also the value provsql.fallback_compiler / the wmc tool selector use
executableexecutable to resolve on PATH (defaults to name)
kind'cli' (spawn executable) or 'kcmcp' (talk to the KCMCP server at endpoint)
operationscapabilities (KCMCP names): 'compile' / 'wmc' (and ProvSQL-local 'render')
input_formatsaccepted inputs (KCMCP names): 'dimacs-cnf', 'circuit-bcs12' (listing 'circuit-bcs12' enables the native-circuit fast path)
output_formatresult encoding (KCMCP names): 'ddnnf-nnf', 'decimal', 'rational', ... (local 'panini-dd' / 'ascii' where KCMCP has no code)
parserCLI-only decode tag: 'nnf' (the tolerant d4 / c2d NNF reader), 'panini-dd', 'wmc-line', 'weightmc', 'ascii'
argtplcommand template; placeholders {in} / {out} (and {binary} / {tmpdir} / {pivotAC}). When it omits {binary}, the executable is prepended.
argtpl_circuitcommand used when the 'circuit-bcs12' input is selected (a BC-S1.2 circuit rather than a CNF); only a tool accepting that input needs it
preferenceordering within an operation (higher first)
enabledwhether the dispatchers may select it
endpointfor a 'kcmcp' RECORD, the server address: 'unix:/path' or 'host:port'

Superuser-only: a CLI RECORD runs an arbitrary command as the PostgreSQL OS user, and a kcmcp RECORD names a socket the server connects to.

Source code
provsql.sql line 6861

Unregister a tool; errors on an unknown tool name. Superuser-only.

Source code
provsql.sql line 6878

Enable/disable a tool; errors on an unknown tool name. Superuser-only.

Source code
provsql.sql line 6883

Set a tool's preference; errors on an unknown tool name. Superuser-only.

Source code
provsql.sql line 6888 The mutators guard at the C level too, but revoke from PUBLIC so the superuser requirement is visible in the catalog.

Return an XML representation of the provenance circuit

Parameters
tokenroot provenance token
token2descoptional mapping table for gate descriptions
Source code
provsql.sql line 6905

Return the provenance token of the current query result tuple

Source code
provsql.sql line 6912

Compute where-provenance for a result tuple

Returns a TEXT representation showing which input columns contributed to each output column.

Source code
provsql.sql line 6921

Functions and statements executed at extension load time to reset internal caches and create the constant zero/one gates.

Function Documentation

◆ reset_constants_cache()

VOID update_provenance::reset_constants_cache ( )

Reset the internal cache of OID constants used by the query rewriter.

Source code
provsql.sql line 6934