Trait pgrx_pg_sys::PgNode
source · pub trait PgNode: Sealed {
// Provided method
fn display_node(&self) -> String { ... }
}
Expand description
A trait applied to all Postgres pg_sys::Node
types and subtypes
Provided Methods§
sourcefn display_node(&self) -> String
fn display_node(&self) -> String
Format this node
§Safety
While pgrx controls the types for which PgNode
is implemented and only pgrx can implement
PgNode
it cannot control the members of those types and a user could assign any pointer
type member to something invalid that Postgres wouldn’t understand.
Because this function is used by impl Display
we purposely don’t mark it unsafe
. The
assumption here, which might be a bad one, is that only intentional misuse would actually
cause undefined behavior.