Crate pgx_pg_sys
source ·Re-exports
pub use submodules::*;
pub use crate::submodules::htup::*;
Modules
Macros
Log to Postgres’
fatal
log level. This will abort the current Postgres backend connection process.Log to Postgres’
panic
log level. This will cause the entire Postgres cluster to crash.If an interrupt is pending (perhaps a user-initiated “cancel query” message to this backend),
this will safely abort the current transaction
Log to Postgres’
debug1
log level.Log to Postgres’
debug2
log level.Log to Postgres’
debug3
log level.Log to Postgres’
debug4
log level.Log to Postgres’
debug5
log level.Sends some kind of message to Postgres, and if it’s a PgLogLevel::ERROR or greater, Postgres’
error handling takes over and, in the case of PgLogLevel::ERROR, aborts the current transaction.
Log to Postgres’
error
log level. This will abort the current Postgres transaction.This macro returns the name of the enclosing function.
As the internal implementation is based on the
std::any::type_name
, this macro derives
all the limitations of this function.Log to Postgres’
info
log level.Log to Postgres’
log
log level.Log to Postgres’
notice
log level.Log to Postgres’
warning
log level.Structs
Optimizable Statements
Query Tree
Raw Grammar Output Statements
Supporting data structures for Parse Trees
Enums
Constants
this comes from
postgres_ext.h
Statics
System interrupt and critical section handling
globals.h – *
Traits
A trait for converting a thing into a
char *
that is allocated by Postgres’ pallocA trait applied to all Postgres
pg_sys::Node
types and subtypesFunctions
#define BufferGetBlock(buffer)
(
AssertMacro(BufferIsValid(buffer)),
BufferIsLocal(buffer) ?
LocalBufferBlockPointers[-(buffer) - 1]
:
(Block) (BufferBlocks + ((Size) ((buffer) - 1)) * BLCKSZ)
)
(
AssertMacro(BufferIsValid(buffer)),
BufferIsLocal(buffer) ?
LocalBufferBlockPointers[-(buffer) - 1]
:
(Block) (BufferBlocks + ((Size) ((buffer) - 1)) * BLCKSZ)
)
#define BufferGetPage(buffer) ((Page)BufferGetBlock(buffer))
#define BufferIsLocal(buffer) ((buffer) < 0)
Given a valid HeapTuple pointer, return address of the user data
Given a currently-allocated chunk of Postgres allocated memory, determine the context
it belongs to.
Safety
Returns true if memory context is valid, as Postgres determines such a thing.
bit⚠
chr⚠
dcos⚠
dcot⚠
dexp⚠
die⚠
dpi⚠
dpow⚠
dsin⚠
dtan⚠
dtof⚠
fls⚠
flsl⚠
ftod⚠
Retrieve the “user data” of the specified [
HeapTuple
] as a specific type. Typically this
will be a struct that represents a Postgres system catalog, such as [FormData_pg_class
].lpad⚠
now⚠
oper⚠
rpad⚠
Type Definitions
Other Statements (no optimizations required)
pmod.h – *
POSTGRES processing mode definitions. *