pub struct FunctionBinding {
pub object_id: Option<[u8; 16]>,
pub name: String,
pub argument_types: Vec<String>,
pub builtin: bool,
pub dispatch: Option<FunctionDispatch>,
pub invocation: Option<Box<RoutineInvocationBinding>>,
pub value_binding: Option<Box<FunctionValueBinding>>,
pub resolution_error: Option<Box<FunctionResolutionError>>,
pub input_collation: Option<CollationSelection>,
}Fields§
§object_id: Option<[u8; 16]>Stable identity of a bound user routine. Built-ins and unbound calls leave this unset.
name: String§argument_types: Vec<String>§builtin: bool§dispatch: Option<FunctionDispatch>Executor operation selected structurally during parsing or overload binding. SQL-visible routine lookup never consults display-name conventions for these operations.
invocation: Option<Box<RoutineInvocationBinding>>Concrete invocation contract selected during routine overload resolution.
value_binding: Option<Box<FunctionValueBinding>>Field selection and assignment carry mutually exclusive typed value metadata outside ordinary expression storage.
resolution_error: Option<Box<FunctionResolutionError>>A typed overload-resolution failure retained until the expression reaches a fallible planning or execution boundary. This never reuses the SQL function-name namespace as an error channel.
input_collation: Option<CollationSelection>The collation analysis selected for the call’s collatable inputs, PostgreSQL’s inputcollid: the merged collation of its arguments, where an explicit COLLATE wins and conflicting implicit collations leave zero, an indeterminate selection that a collation-dependent function reports when it runs. A call without collatable inputs records nothing. Definitions stored before this selection was retained also record nothing; Self::selected_input_collation then supplies the database default collation, which is what PostgreSQL records when every collatable input carries the default collation, and recreating such a definition records its actual selection.
Implementations§
Source§impl FunctionBinding
impl FunctionBinding
pub fn composite_field(&self) -> Option<&CompositeFieldBinding>
pub fn composite_field_mut(&mut self) -> Option<&mut CompositeFieldBinding>
pub fn set_composite_field(&mut self, field: CompositeFieldBinding)
pub fn assignment(&self) -> Option<&AssignmentBinding>
pub fn set_assignment(&mut self, assignment: AssignmentBinding)
Source§impl FunctionBinding
impl FunctionBinding
Sourcepub fn polymorphic_builtin_syntax(name: &str) -> Self
pub fn polymorphic_builtin_syntax(name: &str) -> Self
Construct the identity marker used when PostgreSQL parses a polymorphic syntax expression instead of an ordinary function call.
Sourcepub fn dispatched(dispatch: FunctionDispatch) -> Self
pub fn dispatched(dispatch: FunctionDispatch) -> Self
Construct a parser- or binder-owned expression with an identity that cannot collide with a SQL routine name.
pub fn dispatched_with_control( dispatch: FunctionDispatch, control: &ProductionControl<'_>, ) -> Result<Produced<Self>, ValueRetentionError>
Sourcepub fn undefined_function(
name: impl Into<String>,
signature: impl Into<String>,
) -> Self
pub fn undefined_function( name: impl Into<String>, signature: impl Into<String>, ) -> Self
Preserve an undefined-overload error structurally without fabricating a dispatch name.
Sourcepub fn selected_input_collation(binding: Option<&Self>) -> u32
pub fn selected_input_collation(binding: Option<&Self>) -> u32
The input collation a collation-dependent built-in runs with: the retained selection, or the database default collation when none was recorded.
Sourcepub fn rebind(binding: &mut Option<Self>, selected: Self)
pub fn rebind(binding: &mut Option<Self>, selected: Self)
Replace the binding of an analyzed call with a later structural or overload selection. Later binding passes do not observe argument collations, so the selection keeps the input collation analysis retained.
Sourcepub fn builtin_by_name(
name: &str,
input_collation: Option<CollationSelection>,
) -> Self
pub fn builtin_by_name( name: &str, input_collation: Option<CollationSelection>, ) -> Self
A built-in call that analysis selected by name, without a registered catalog signature, retained so its input collation reaches execution.
Sourcepub fn is_polymorphic_builtin_syntax(&self) -> bool
pub fn is_polymorphic_builtin_syntax(&self) -> bool
Return whether this binding marks a polymorphic syntax expression whose argument types must be inferred from its operands.
Sourcepub fn is_polymorphic_builtin_syntax_name(name: &str) -> bool
pub fn is_polymorphic_builtin_syntax_name(name: &str) -> bool
Return whether an unqualified local name belongs to PostgreSQL’s polymorphic function-like syntax expressions.
Source§impl FunctionBinding
impl FunctionBinding
Sourcepub fn clone_with_control(
&self,
control: &ProductionControl<'_>,
) -> Result<Produced<Self>, CatalogRetentionError>
pub fn clone_with_control( &self, control: &ProductionControl<'_>, ) -> Result<Produced<Self>, CatalogRetentionError>
Copy the complete bound identity with the scalar lowerer’s existing allocation admission.
Trait Implementations§
Source§impl Clone for FunctionBinding
impl Clone for FunctionBinding
Source§impl Debug for FunctionBinding
impl Debug for FunctionBinding
Source§impl<'de> Deserialize<'de> for FunctionBinding
impl<'de> Deserialize<'de> for FunctionBinding
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for FunctionBinding
Source§impl PartialEq for FunctionBinding
impl PartialEq for FunctionBinding
Source§impl Serialize for FunctionBinding
impl Serialize for FunctionBinding
impl StructuralPartialEq for FunctionBinding
Auto Trait Implementations§
impl Freeze for FunctionBinding
impl RefUnwindSafe for FunctionBinding
impl Send for FunctionBinding
impl Sync for FunctionBinding
impl Unpin for FunctionBinding
impl UnsafeUnpin for FunctionBinding
impl UnwindSafe for FunctionBinding
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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> ⓘ
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