Crate plrust_trusted_pgx

Source
Expand description

plrust-trusted-pgx is a re-export crate based on pgx which exposes the minimal set of pgx internals necessary for plrust function compilation. plrust-trusted-pgx also includes a number of Rust types for interoperating with Postgres types, access to Postgres’ “SPI”, logging, and trigger support.

Re-exports§

pub use datum::*;
pub use heap_tuple::*;
pub use iter::*;
pub use pg_sys::*;
pub use trigger_support::*;

Modules§

datum
Safe Rust wrappers for various Postgres types.
heap_tuple
Support for arbitrary composite types as a “heap tuple”.
iter
Return iterators from plrust functions
pg_sys
Lower-level Postgres internals, which are safe to use.
prelude
Use all the things.
spi
Use Postgres’ Server Programming Interface to execute arbitrary SQL.
trigger_support
Various types for use when a plrust function is a trigger function.

Macros§

debug1
Log to Postgres’ debug1 log level.
debug2
Log to Postgres’ debug2 log level.
debug3
Log to Postgres’ debug3 log level.
debug4
Log to Postgres’ debug4 log level.
debug5
Log to Postgres’ debug5 log level.
ereport
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.
error
Log to Postgres’ error log level. This will abort the current Postgres transaction.
info
Log to Postgres’ info log level.
log
Log to Postgres’ log log level.
notice
Log to Postgres’ notice log level.
warning
Log to Postgres’ warning log level.

Structs§

Spi

Traits§

ErrorReportable
Indicates that something can be reported as a Postgres ERROR, if that’s what it might represent.