Expand description
Safe access to Postgres’ Server Programming Interface (SPI).
Re-exports§
pub use SpiResult as Result;
Structs§
- Owned
Prepared Statement - Static lifetime-bound prepared statement
- Prepared
Statement - Client lifetime-bound prepared statement
- Spi
- SpiClient
- SpiCursor
- An SPI Cursor from a query
- SpiHeap
Tuple Data - Represents the set of
pg_sys::Datum
s in apg_sys::HeapTuple
- SpiHeap
Tuple Data Entry - Represents a single
pg_sys::Datum
inside aSpiHeapTupleData
- SpiTuple
Table - Unknown
Variant
Enums§
- SpiError
- Set of possible errors
pgrx
might return while working with Postgres SPI. - SpiError
Codes - 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. - SpiOk
Codes - These match the Postgres
#define
d constants prefixedSPI_OK_*
that you can find inpg_sys
.
Traits§
- Query
- A generalized interface to what constitutes a query
Functions§
- quote_
identifier - 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"
- quote_
literal - A safe wrapper around
pg_sys::quote_literal_cstr
. Returns a properly quoted literal such as aTEXT
literal like'my string with spaces'
. - quote_
qualified_ identifier - 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"
.