pub enum RoutineBody {
Bound(Arc<CompiledFunctionBody>),
Source,
}Expand description
A routine body as the catalog keeps it. A SQL-standard body is bound when the routine is defined, as PostgreSQL stores prosqlbody as parse trees that name objects by OID. A body given as a string is compiled by each session that uses the routine, as the backend function cache compiles prosrc, so its names resolve when that session first needs them.
A routine body as the catalog keeps it.
Variants§
Bound(Arc<CompiledFunctionBody>)
A SQL-standard body, which the statement that defines the routine analyzes and binds.
Source
A body given as a string, which the catalog keeps as text, as PostgreSQL keeps prosrc: CREATE FUNCTION validates it only under check_function_bodies, and each session compiles it when it first calls the routine, so a body that no longer compiles reports its error then.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RoutineBody
impl RefUnwindSafe for RoutineBody
impl Send for RoutineBody
impl Sync for RoutineBody
impl Unpin for RoutineBody
impl UnsafeUnpin for RoutineBody
impl UnwindSafe for RoutineBody
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more