兼容性判定
公开资料依据 · 建议 PoC 复核支持度partial
严重度major
置信度medium
依据规则my.type.year
怎么改
YEAR -> smallint + CHECK
判定说明
无 YEAR 专用类型;整数可承接但零年/范围/格式建议 PoC 复核
库侧 / 应用侧路径
库侧改造
可行:改整数并按业务年份范围补 CHECK
应用侧改造
可行:调整驱动 YEAR 专用类型/格式化
推荐路线:db_side。验证建议:0、边界年份、默认值与接口格式对照
规则样例
CREATE TABLE model (made_year YEAR)
ALTER TABLE person ADD birth_year YEAR(4)
CREATE TABLE model (made_year SMALLINT)
参考来源
- https://github.com/dimitri/pgloader/blob/0965f1f5a67cef8a8cec30845e7f77e87f02eded/docs/ref/mysql.rst
- https://www.postgresql.org/docs/16/datatype-numeric.html
- https://www.postgresql.org/docs/16/datatype.html
- https://www.postgresql.org/docs/16/functions.html
- https://www.postgresql.org/docs/16/sql-commands.html
相关改造点
- MYSQL → postgresql 16 全部改造点
- postgresql 16 兼容性总览
- MYSQL 迁移国产库总览
- ORACLE ADD_MONTHS 函数 迁移 postgresql 16 怎么改
- ORACLE ALTER SESSION SET 会话参数 迁移 postgresql 16 怎么改
- ORACLE ANYDATA 动态类型列 迁移 postgresql 16 怎么改
- ORACLE ASCIISTR Unicode 转义函数 迁移 postgresql 16 怎么改
- ORACLE 关联数组(INDEX BY 表) 迁移 postgresql 16 怎么改
- ORACLE AT TIME ZONE 时区表达式 迁移 postgresql 16 怎么改