Expand description
Safe access to Postgres’ Server Programming Interface (SPI).
Re-exports§
pub use SpiResult as Result;
Structs§
- Static lifetime-bound prepared statement
- Client lifetime-bound prepared statement
- An SPI Cursor from a query
- Represents the set of
pg_sys::Datum
s in apg_sys::HeapTuple
- Represents a single
pg_sys::Datum
inside aSpiHeapTupleData
Enums§
- Set of possible errors
pgrx
might return while working with Postgres SPI - These match the Postgres
#define
d constants prefixedSPI_ERROR_*
that you can find inpg_sys
. It is hypothetically possible for a Postgres-defined status code to be0
, AKANULL
, however, this should not usually occur in Rust code paths. If it does happen, please report such bugs to the pgrx repo. - These match the Postgres
#define
d constants prefixedSPI_OK_*
that you can find inpg_sys
.
Traits§
- A generalized interface to what constitutes a query
Functions§
- A safe wrapper around
pg_sys::quote_identifier
. Returns a properly quoted identifier. For instance for a column or table name such as"my-table-name"
- A safe wrapper around
pg_sys::quote_literal_cstr
. Returns a properly quoted literal such as aTEXT
literal like'my string with spaces'
. - A safe wrapper around
pg_sys::quote_qualified_identifier
. Returns a properly quoted name of the following format qualifier.ident. A common usecase is to qualify a table_name for example"my schema"."my table"