Skip to main content

Module type_resolution

Module type_resolution 

Source
Expand description

Static SQL type propagation and PostgreSQL-compatible common-type rules.

Structs§

BuiltinFunctionOverload
ResolvedFunctionOverload

Traits§

FunctionTypeResolver

Functions§

assignment_type_compatible
Whether PostgreSQL assignment coercion accepts the declared source and target. Domains use their base type for cast selection and retain constraint checking at the value conversion boundary; array coercion applies element by element.
bind_type_introspection
Bind polymorphic type-introspection calls and common-type coercions while the input schema still carries declared SQL types. Runtime values deliberately do not encode integer widths, varchar identity, or float widths, and selector expressions must return the common SQL type rather than the storage type of the branch selected at runtime.
bind_type_introspection_with_resolver
Bind type-introspection calls with access to catalog-backed function and aggregate overloads.
builtin_function_argument_targets
Return the declared argument targets selected by PostgreSQL-compatible built-in resolution. Known argument types are retained for polymorphic calls, while fixed signatures and overloaded operators supply the context needed to resolve unknown arguments.
builtin_function_type
coerce_common_context_value
common_context_expression_type
Resolve an expression participating in PostgreSQL’s common-type selection. Bare string and NULL literals retain the parser’s unknown type until the surrounding VALUES, set operation, CASE, or array context selects a concrete type.
common_type
equality_operand_type
explicit_type_compatible
Whether an explicit SQL cast has a PostgreSQL coercion path, independently of its value. NULL input does not make an otherwise missing cast valid.
foreign_key_operand_type
Resolve the comparison type accepted by a PostgreSQL foreign key. The referenced key’s operator class makes compatibility directional: an implicit cast from the referencing type to the referenced type is valid, while the reverse cast alone is not. Integer widths, floating widths, character strings, and date/timestamp types additionally have cross-type equality operators in their shared operator families.
resolve_declared_column_type
scalar_type
scalar_type_with_resolver
values_column_types