兼容性判定
公开资料依据 · 建议 PoC 复核支持度partial
严重度critical
置信度medium
依据规则ora.func.vsize
怎么改
按用途选择 octet_length 或 pg_column_size
判定说明
Oracle 内部表示、编码字节数与 PG 存储占用不等价;逐类型建议 PoC 复核
库侧 / 应用侧路径
库侧改造
可行:按原用途选择 octet_length 或 pg_column_size,并处理 NULL/TOAST
应用侧改造
可行:协议载荷字节数可在编码后由应用计算
推荐路线:case_by_case。验证建议:NUMBER、DATE、多字节文本、RAW、NULL 与大对象逐类型对账
规则样例
SELECT VSIZE(payload) FROM event_log
SELECT id FROM t WHERE VSIZE(raw_value) > 100
SELECT LENGTH(payload) FROM event_log
参考来源
- https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/VSIZE.html
- https://www.postgresql.org/docs/16/functions-string.html
- https://www.postgresql.org/docs/16/functions-admin.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
- https://github.com/darold/ora2pg/blob/97015451a4d1cfbee888f2e6efe7ff68c239a9b5/lib/Ora2Pg/PLSQL.pm#L183-L222
相关改造点
- ORACLE → postgresql 16 全部改造点
- postgresql 16 兼容性总览
- ORACLE 迁移国产库总览
- 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 怎么改