ora2pg icon indicating copy to clipboard operation
ora2pg copied to clipboard

Issue when transfer a package with procedure definition in function definition

Open HAHAHA44 opened this issue 8 months ago • 2 comments

When I tried to export a oracle PACKAGE to pgsql, it only exported some procedure, but ignored the other function and package body.

And when I commented the procedure definitions, other package body and functions are exported correctly.

The oracle sql defined like this structures:

PACKAGE start FUNCTION start FUNCTION body, with PROCEDURE definitions, FUNCTION end PACKAGE end

only when procedures removed, the remained parts can be converted correctly.

Is this a known issue?

HAHAHA44 avatar Aug 18 '25 10:08 HAHAHA44

and when I tried to export as FUNCTION type, and with -i directive (not connected to oracle database), the whole function with procedures could be converted.

HAHAHA44 avatar Aug 18 '25 10:08 HAHAHA44

yes embedded functions or procedures in other stored procedures are not supported, the solution is to extract embedded function and create them as standalone function. This can be done in Oracle or in the source DDL file to parse using the -i option.

darold avatar Aug 20 '25 05:08 darold