ora2pg icon indicating copy to clipboard operation
ora2pg copied to clipboard

Package specification is not exporting using ora2pg

Open naveenjul29 opened this issue 5 years ago • 2 comments

Below package specification is not exporting using ora2pg:

Oracle package code:

create or replace PACKAGE Employee_pkg as
g_phone varchar2(50) := '12345' ;
c_Hiredate constant date := '10-JAN-10';
CURSOR employees_cursor IS
SELECT EMPLOYEE_ID,
FIRST_NAME,
SALARY
FROM EMPLOYEES;
CURSOR c_salary (low_salary NUMBER, high_salary NUMBER)
IS
SELECT *
FROM EMPLOYEES
WHERE SALARY BETWEEN low_salary AND high_salary;
TYPE emp_det is RECORD
(
EMP_NO NUMBER := 1,
EMP_NAME VARCHAR2(150):='aa',
MANAGER NUMBER:= 3,
SALARY NUMBER :=100
);
TYPE emp_id IS TABLE OF number;
END Employee_pkg;

ora2pg output:

Looking global declaration in package pkg_globla_types...

then nothing is happend. package is not exported.

Please assist further.

naveenjul29 avatar Oct 27 '20 17:10 naveenjul29

Darold, can you please look into this?

naveenjul29 avatar Oct 30 '20 16:10 naveenjul29

I have looked yesterday night, I can not reproduce the problem unless that cursors and type are not exported which is expected otherwise the global variables are well exported in global_configuration.conf. I mark this issue as need enhancement to be able to export custom type, but for cursors this is not possible. Cursor have to be defined where they are used, I don't remember if this is already done but otherwise I think it is possible to do that.

darold avatar Oct 30 '20 16:10 darold