ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
Loading...
Searching...
No Matches
probability_store.h File Reference

Write-once probabilities: the entry points other files use. More...

#include "postgres.h"
#include "provsql_utils.h"
Include dependency graph for probability_store.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void provsql_set_prob_tracked (const pg_uuid_t *token, double prob)
 Write token's probability and record the write, so that a rollback of the current (sub)transaction clears it.

Detailed Description

Write-once probabilities: the entry points other files use.

See probability_store.c for what "written once" means and how a rolled-back write is undone.

Definition in file probability_store.h.

Function Documentation

◆ provsql_set_prob_tracked()

void provsql_set_prob_tracked ( const pg_uuid_t * token,
double prob )

Write token's probability and record the write, so that a rollback of the current (sub)transaction clears it.

Raises when the gate carries no probability, when prob is outside [0, 1], and when the gate already holds a different probability. Writing the value the gate already holds is a no-op.

Definition at line 268 of file probability_store.c.

Here is the call graph for this function:
Here is the caller graph for this function: