Expand description
Static relational row-type binding.
This module derives source and query output schemas from plans, catalog
declarations, and already-bound CTE schemas. It never executes a query or
samples a result row, so empty, spilled, and correlated relations retain
the same declared PostgreSQL type identities as non-empty relations.
Re-exports§
pub use context::BindingContext;
Modules§
- catalog_
sources - Engine-independent catalog source binding.
- context
- Immutable SQL inputs adapted from the active statement scope.
- correlation
- Physical-plan correlation analysis for scalar subquery initialization.
- portals
- Cursor binding and dependency metadata consumed before snapshot registration.
- scoped_
types - Catalog-backed function and scalar-subquery typing within an owned analysis scope.
- snapshot
- Owned catalog and CTE type inputs for analysis that rewrites nested scopes.
- statements
- Executable statement schemas and mutation parameter analysis.
- stored_
columns - Stored statement column identities, durable source shapes, and rewrite-rule binding.
- stored_
relations - Bind durable statement relations while preserving namespace, catalog, and error ordering.
- stored_
routines - Exact routine binding for catalog-owned statements.
- view_
dependencies - Stored-view relation and sequence binding/dependency analysis.
Functions§
- analyze_
expression_ plan_ type - Validate a command argument’s names and types without running its expressions.
- analyze_
prepared_ command_ schema - analyze_
projection_ output_ schema - Derive and validate a projection’s exact output row type without executing it.
- analyze_
query_ plan_ schema - Analyze every catalog and scalar reference and derive the exact output row type without executing the query.
- analyze_
query_ plan_ schema_ with_ catalog - analyze_
recursive_ control_ step - analyze_
source_ plan_ schema - Derive and validate one FROM source’s exact row type without executing it.
- bind_
expression_ plan_ routines_ for_ storage - Bind every routine call owned by a stored scalar expression and validate its complete query-valued descendants against the expression’s row scope.
- bind_
expression_ plan_ type - Derive the declared SQL type of a standalone expression plan without executing it. The plan-owned subquery arena participates in type resolution so scalar subqueries retain their projected type at command boundaries such as
CALL. - bind_
projection_ output_ schema - Bind a projection against an already-declared input schema.
star_schemaidentifies the relation expanded by bare*;expression_schemamay also contain joined sources and hidden lookup aliases used by scalar expressions. - bind_
query_ plan_ routines_ for_ storage - bind_
query_ plan_ schema - Derive the exact output row type of a query plan without executing it.
- bind_
source_ plan_ schema - Derive the exact row type of one FROM source without executing it.
- bind_
source_ plan_ schema_ for_ execution - Bind every table-function source in one execution-owned source plan to its exact routine identity and return the schema derived from those same bindings.
- extend_
cte_ generated_ schema - hide_
recursive_ generated_ schema - infer_
prepared_ parameter_ types - overlay_
outer_ schema - validate_
query_ block_ expression_ types - Validate every scalar expression in a query block while the physical input still carries declared SQL types. This must precede polymorphic rewrites such as
pg_typeof, because an invalid common type is an error, not anunknownresult. - validate_
query_ block_ references - Validate every query-block reference only after the caller has the authoritative source schema. This preserves registered table-function row shapes and checks recursive argument references before definitive routine namespace lookup.
- values_
types_ in_ scope - with_
query_ table_ pseudo_ columns - Add query-block pseudo columns after the complete source scope is known, so
_metais exposed only for one unambiguous local-table source and never shadows a real relation alias.