兼容性判定
公开资料依据 · 建议 PoC 复核支持度none
严重度critical
置信度medium
依据规则ora.pkg.dbms_sql_result_api
怎么改
改原生 refcursor/SETOF/OUT 参数,并同步驱动结果集协议
判定说明
core 无 RETURN_RESULT/GET_NEXT_RESULT/游标互转 API;调用链需重设计,建议 PoC 复核
库侧 / 应用侧路径
库侧改造
可行:按调用用途改 refcursor 或集合返回函数
应用侧改造
可行:JDBC/驱动侧改显式多个查询和结果集消费
推荐路线:case_by_case。验证建议:单/多结果集、游标生命周期、事务结束和驱动取数顺序回归
规则样例
BEGIN DBMS_SQL.RETURN_RESULT(l_cursor); END;
v_rc := DBMS_SQL.TO_REFCURSOR(v_cursor_id);
v_cursor_id := DBMS_SQL.OPEN_CURSOR;
参考来源
- https://docs.oracle.com/en/database/oracle/oracle-database/19/arpls/DBMS_SQL.html
- https://www.postgresql.org/docs/16/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN
- 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://support.huaweicloud.com/intl/en-us/usermanual-ugo/ugo_conv_01_0026.html
相关改造点
- 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 怎么改