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

Table recording the history of INSERT, UPDATE, DELETE, and UNDO operations. More...

Attributes

UUID provsql
TEXT query
QUERY_TYPE_ENUM query_type
TEXT username
TIMESTAMP ts
TSTZMULTIRANGE valid_time
xid8 xid
UUID tx_token

Detailed Description

Table recording the history of INSERT, UPDATE, DELETE, and UNDO operations.

Each row records one provenance-tracked modification, linking the operation's provenance token to metadata (query TEXT, type, user, TIMESTAMP) and the temporal validity range of the affected rows.

A row of type TRANSACTION stands for the transaction the statements around it belong to (see provsql.transaction_token): xid is its transaction id and its own tx_token is NULL, while every statement row of that transaction carries the transaction's token in tx_token. A modified tuple's provenance names both – the effect is times(tx_token, statement_token) – so undo() reverses either one statement or the whole transaction, and the temporal semiring reads the transaction's validity through the shared factor.

ts and the lower bound of valid_time are stamped at commit, not at the statement: CURRENT_TIMESTAMP is the transaction's start time, so two overlapping transactions could otherwise commit in the opposite order of their recorded validity.

Source code
provsql.sql line 11062

Field Documentation

◆ provsql

UUID update_provenance::provsql

◆ query

TEXT update_provenance::query

◆ query_type

QUERY_TYPE_ENUM update_provenance::query_type

◆ ts

TIMESTAMP update_provenance::ts

◆ tx_token

UUID update_provenance::tx_token

◆ username

TEXT update_provenance::username

◆ valid_time

TSTZMULTIRANGE update_provenance::valid_time

◆ xid

xid8 update_provenance::xid

The documentation for this TYPE was generated from the following file: