pub struct FunctionAttrs {
pub volatility: FunctionVolatility,
pub strict: bool,
pub security_definer: bool,
pub leakproof: bool,
pub parallel: FunctionParallel,
pub cost: Option<f64>,
pub rows: Option<f64>,
}Expand description
v7.39 (round 322, V46) — the attribute clauses CREATE FUNCTION accepts
on either side of its body. Defaults are PG’s: VOLATILE, called on null
input, SECURITY INVOKER, not leakproof, PARALLEL UNSAFE, and the
language’s default cost / rows.
Fields§
§volatility: FunctionVolatility§strict: boolSTRICT / RETURNS NULL ON NULL INPUT: a call with any NULL
argument returns NULL without running the body.
security_definer: bool§leakproof: bool§parallel: FunctionParallel§cost: Option<f64>COST n — None leaves PG’s per-language default.
rows: Option<f64>ROWS n — set-returning functions only; None = default.
Implementations§
Source§impl FunctionAttrs
impl FunctionAttrs
Sourcepub fn render_words(&self) -> Vec<String>
pub fn render_words(&self) -> Vec<String>
The attribute words pg_get_functiondef puts on their own line,
in PG’s order (measured on 18.4: volatility, PARALLEL, STRICT,
SECURITY DEFINER, LEAKPROOF, COST, ROWS). Empty when everything is
at its default — PG then emits no such line at all.
Trait Implementations§
Source§impl Clone for FunctionAttrs
impl Clone for FunctionAttrs
Source§fn clone(&self) -> FunctionAttrs
fn clone(&self) -> FunctionAttrs
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for FunctionAttrs
Source§impl Debug for FunctionAttrs
impl Debug for FunctionAttrs
Source§impl Default for FunctionAttrs
impl Default for FunctionAttrs
Source§fn default() -> FunctionAttrs
fn default() -> FunctionAttrs
Returns the “default value” for a type. Read more
Source§impl PartialEq for FunctionAttrs
impl PartialEq for FunctionAttrs
impl StructuralPartialEq for FunctionAttrs
Auto Trait Implementations§
impl Freeze for FunctionAttrs
impl RefUnwindSafe for FunctionAttrs
impl Send for FunctionAttrs
impl Sync for FunctionAttrs
impl Unpin for FunctionAttrs
impl UnsafeUnpin for FunctionAttrs
impl UnwindSafe for FunctionAttrs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more