Crate pgrx_pg_sys
source ·Re-exports
pub use submodules::*;pub use crate::submodules::htup::*;
Modules
Macros
- Log to Postgres’
fatallog level. This will abort the current Postgres backend connection process. - Log to Postgres’
paniclog 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’
debug1log level. - Log to Postgres’
debug2log level. - Log to Postgres’
debug3log level. - Log to Postgres’
debug4log level. - Log to Postgres’
debug5log 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’
errorlog 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’
infolog level. - Log to Postgres’
loglog level. - Log to Postgres’
noticelog level. - Log to Postgres’
warninglog level.
Structs
- Optimizable Statements
- Node and structure definitions
- 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’ palloc - A trait applied to all Postgres
pg_sys::Nodetypes and subtypes
Functions
- #define BufferGetBlock(buffer)
(
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.
- __j0⚠
- __j1⚠
- __jn⚠
- __y0⚠
- __y1⚠
- __yn⚠
- bit⚠
- chr⚠
- dcos⚠
- dcot⚠
- dexp⚠
- die⚠
- dpi⚠
- dpow⚠
- dsin⚠
- dtan⚠
- dtof⚠
- fls⚠
- 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
- Global variable declarations
- Other Statements (no optimizations required)
- pmod.h – * POSTGRES processing mode definitions. *