Expand description
plrust-trusted-pgrx is a re-export crate based on pgrx which exposes
the minimal set of pgrx internals necessary for plrust function compilation. plrust-trusted-pgrx
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.
- fn_call
- 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
plrustfunction is a trigger function.
Macros§
- debug1
- Log to Postgres’
debug1log level. - debug2
- Log to Postgres’
debug2log level. - debug3
- Log to Postgres’
debug3log level. - debug4
- Log to Postgres’
debug4log level. - debug5
- Log to Postgres’
debug5log 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’
errorlog level. This will abort the current Postgres transaction. - info
- Log to Postgres’
infolog level. - log
- Log to Postgres’
loglog level. - notice
- Log to Postgres’
noticelog level. - warning
- Log to Postgres’
warninglog level.
Structs§
Enums§
- Arg
- The kinds of
fn_callarguments. - FnCall
Error FnCallErrors represent the set of conditions that could casefn_call()to fail in a user-recoverable manner.
Traits§
- Error
Reportable - Indicates that something can be reported as a Postgres ERROR, if that’s what it might represent.
- FnCall
Arg - Augments types that can be used as
fn_callarguments. This is only implemented for theArgenum.
Functions§
- fn_call
- Dynamically call a named function in the current database. The function must be one previously
defined by
CREATE FUNCTION. Its underlyingLANGUAGEis irrelevant – callLANGUAGE sql,LANGUAGE plpgsql,LANGUAGE plperl, or (our favorite)LANGUAGE plrustfunctions.