fn ast_rewrite_strip_builtin_version_pins(
stmt: &mut Statement<Raw>,
) -> Result<(), Error>Expand description
Strips the VERSION qualifier from by-id references to non-user (builtin)
items.
A version pin on a builtin is meaningless, since builtins are not
user-versioned. Older binaries could still persist such a pin, and once the
builtin is converted to an item type without versions (e.g. a materialized
view) reparsing the pin fails with InvalidVersion and panics during
catalog open, wedging the upgrade. Stripping it makes the reference resolve
to the latest version.
The read-side resolver tolerates these pins too, so this is durable cleanup rather than a correctness requirement. Safe to run every boot: stripping an absent version is a no-op.