Expand description
Differ for Catalog::casts.
Casts are managed (global, non-schema-scoped): a live cast that is absent from source IS auto-dropped — unlike lenient objects such as event triggers or statistics.
Identity is (source, target). Because
QualifiedName does not implement
Ord, the BTreeMap key is (String, String) where each String is
QualifiedName::render_sql() — a stable, canonical representation.
Logic summary:
- source-only →
Create(Safe). - target-only →
Drop(Safe — casts carry no data). - both present,
methodorcontextdiffer →Replace(Safe — Postgres has noALTER CAST; subsumes comment). - else: comment differs →
CommentOn(Safe).
Functions§
- diff_
casts - Compute cast changes needed to converge
target(live) towardsource.