Modules§
- cmp
- datum
- elog
- Access to Postgres’ logging system
- errcodes
- ffi
- htup
- oids
- panic
- pg_try
- transaction_
id - tupdesc
- Provides helper implementations for various
TupleDesc-related structs - utils
- General utility functions
Structs§
- Datum
- Datum is an abstract value that is effectively a union of all scalar types
and all possible pointers in a Postgres context. That is, it is either
“pass-by-value” (if the value fits into the platform’s
uintptr_t) or “pass-by-reference” (if it does not). - Oid
- An object identifier in Postgres.
- PgTry
Builder PgTryBuilderis a mechanism to mimic Postgres C macrosPG_TRYandPG_CATCH.- Transaction
Id - An
xidtype from PostgreSQL
Enums§
Functions§
- Heap
Tuple ⚠GetRaw Command Id - HeapTupleHeaderGetRawCommandId will give you what’s in the header whether it is useful or not. Most code should use HeapTupleHeaderGetCmin or HeapTupleHeaderGetCmax instead, but note that those Assert that you can get a legitimate result, ie you are in the originating transaction!
- Heap
Tuple ⚠Header Frozen - Does the specified
HeapTupleHeaderDatarepresent a “frozen” tuple? - Heap
Tuple ⚠Header GetNatts - How many attributes does the specified
HeapTupleHeaderhave? - Heap
Tuple ⚠Header GetRaw Xmin - HeapTupleHeaderGetRawXmin returns the “raw” xmin field, which is the xid originally used to insert the tuple. However, the tuple might actually be frozen (via HeapTupleHeaderSetXminFrozen) in which case the tuple’s xmin is visible to every snapshot. Prior to PostgreSQL 9.4, we actually changed the xmin to FrozenTransactionId, and that value may still be encountered on disk.
- Heap
Tuple ⚠Header GetXmin - Returns the
xminvalue of the specifiedHeapTupleHeaderData - Heap
Tuple ⚠Header IsHeap Only - Safety
- Heap
Tuple ⚠Header IsHot Updated - Safety
- Heap
Tuple ⚠Header Xmin Invalid - Safety
- Heap
Tuple ⚠NoNulls - Does the specified
HeapTuplecontain nulls? - heap_
getattr ⚠ - Extract an attribute of a heap tuple and return it as a Datum. This works for either system or user attributes. The given attnum is properly range-checked.
- name_
data_ to_ str - Converts a
pg_sys::NameDatastruct into a&str.