![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
Per-relation metadata for the safe-query optimisation. More...
#include "MMappedTableInfo.h"
Public Attributes | |
| Oid | relid |
| pg_class OID of the relation (primary key) | |
| uint8_t | kind |
One of provsql_table_kind. | |
| uint16_t | block_key_n |
Number of valid entries in block_key. | |
| AttrNumber | block_key [PROVSQL_TABLE_INFO_MAX_BLOCK_KEY] |
| Block-key column numbers. | |
| uint16_t | ancestor_n |
Number of valid entries in ancestors (0 = no registry info). | |
| Oid | ancestors [PROVSQL_TABLE_INFO_MAX_ANCESTORS] |
| Sorted, deduplicated base-relation OIDs. | |
Per-relation metadata for the safe-query optimisation.
One record per provenance-tracked relation. relid is the pg_class OID of the relation and acts as the primary key during linear lookup. kind discriminates between TID, BID, and OPAQUE (see provsql_table_kind). For BID, block_key[0..block_key_n-1] lists the column numbers whose tuples partition the table into mutually-exclusive blocks; an empty key means the whole table is one block. block_key is left empty for TID and OPAQUE. ancestors[0..ancestor_n-1] lists the pg_class OIDs of the original add_provenance / repair_key base relations this relation's atoms ultimately come from (a sorted, deduplicated set). Base tables have ancestor_n == 1 with ancestors[0] == relid; CTAS-derived tables inherit the union of their sources' ancestor sets. ancestor_n == 0 means the registry has no information for this relation – the safe-query rewriter then conservatively refuses to fire when ancestry-based disjointness is required.
Definition at line 118 of file MMappedTableInfo.h.
| uint16_t ProvenanceTableInfo::ancestor_n |
Number of valid entries in ancestors (0 = no registry info).
Definition at line 123 of file MMappedTableInfo.h.
| Oid ProvenanceTableInfo::ancestors[PROVSQL_TABLE_INFO_MAX_ANCESTORS] |
Sorted, deduplicated base-relation OIDs.
Definition at line 124 of file MMappedTableInfo.h.
| AttrNumber ProvenanceTableInfo::block_key[PROVSQL_TABLE_INFO_MAX_BLOCK_KEY] |
Block-key column numbers.
Definition at line 122 of file MMappedTableInfo.h.
| uint16_t ProvenanceTableInfo::block_key_n |
Number of valid entries in block_key.
Definition at line 121 of file MMappedTableInfo.h.
| uint8_t ProvenanceTableInfo::kind |
One of provsql_table_kind.
Definition at line 120 of file MMappedTableInfo.h.
| Oid ProvenanceTableInfo::relid |
pg_class OID of the relation (primary key)
Definition at line 119 of file MMappedTableInfo.h.