Closed ladudu closed 4 months ago
I need the DDL to reproduce, you can remove the body of the procedure between the begin and last end.
CREATE OR REPLACE PACKAGE PRS.PKG_TEST0001 IS
PROCEDURE TEST0011_A;
PROCEDURE A;
END PKG_TEST0001;
CREATE OR REPLACE PACKAGE BODY PRS.PKG_TEST0001
IS
PROCEDURE TEST0011_A
IS
msg CHAR(6) := NULL;
procedure test
is
v_log_msg CHAR(6) := NULL;
begin
v_log_msg := v_log_msg;
end;
BEGIN
msg := msg;
END TEST0011_A;
procedure A
IS
msg CHAR(6) := NULL;
begin
msg := msg;
end;
END PKG_TEST0001;
ora2pg -p -t PACKAGE -c ./config/ora2pg.conf -b ./schema/packages
The file name I generated is below
I haven't figured out the name generation rules yet
CREATE OR REPLACE PROCEDURE pkg_test0001.a () AS $body$
DECLARE
msg char(6) := NULL;
BEGIN
msg := msg;
end;
$body$
LANGUAGE PLPGSQL
SECURITY DEFINER
;
-- REVOKE ALL ON PROCEDURE pkg_test0001.a () FROM PUBLIC;
CREATE OR REPLACE PROCEDURE pkg_test0001.test () AS $body$
DECLARE
v_log_msg char(6) := NULL;
BEGIN
v_log_msg := v_log_msg;
end;
BEGIN
msg := msg;
END;
$body$
LANGUAGE PLPGSQL
SECURITY DEFINER
;
Ok, nested procedure are not supported, this is why the export is wrong. You must fix the nested procedure/function in Oracle prior export with Ora2Pg.
Ok, nested procedure are not supported, this is why the export is wrong. You must fix the nested procedure/function in Oracle prior export with c. Thank you for your reply.
Are there plans to support nesting?
no, not for the moment. This is a huge work, I don't have free time for that.
Will the package support optional export? There too many project packages , which is very time-consuming.
I don't understand this question. Can you please elaborate more?
I want to export only one package,because it's takes too long to export all packages each time.Sometimes only one package changes.
Yes, like tables or other export type using -a "MYPACKAGE"
will only export this package.
My Package names like above PKG_PRSP0210 <--package name --PRSP0221_AXXXXXXXXXXX <--procedure name --AXXXXXXXXXXX <--procedure name The Ora2Pg Generate SQL file name like AXXXXXXXXXXX.sql, This resulted in me actually having two procedures, but only one of them was generated. I tried to create a package for Test,but the results were correct.