Expand description
Plan-time constant folding for catalog-dependent expressions.
fold_catalog_exprs_in_plan walks a SqlPlan and replaces
Cast { expr: Literal(String(s)), to_type: "regclass" } and
Cast { expr: Literal(String(s)), to_type: "regtype" } nodes with
their resolved OID literals using the SqlCatalog trait. This keeps
the data-plane evaluator pure (no catalog/session context) while still
supporting the 'name'::regclass / 'name'::regtype PostgreSQL idiom.
Functionsยง
- fold_
catalog_ exprs_ in_ plan - Walk every
Filterinplanand fold catalog-dependent cast expressions to their constant OID equivalents.