Hi community,
I just found an unexpected limitation of the pl/sql wrapping utility when I wanted to wrap the following type specification:
CREATE OR REPLACE TYPE tp_test_internal
AUTHID DEFINER ACCESSIBLE BY (TYPE tp_test)
AS OBJECT
(
id INTEGER
);
/
When run the wrapping utility with command wrap iname=TP_TEST_INTERNAL.tps ONAME=TP_TEST_INTERNAL.wrp
I get the following output on screen
PL/SQL Wrapper: Release 21.0.0.0.0 - Production on Sa Mrz 4 22:14:01 2023
Version 21.9.0.0.0
Copyright (c) 1982, 2023, Oracle and/or its affiliates. All rights reserved.
Processing TP_TEST_INTERNAL.tps to TP_TEST_INTERNAL.wrp
but the content of the resulting file TP_TEST_INTERNAL.wrp is unwrapped. When the ACCESSIBLE BY clause is omitted wrapping works as expected. Wrapping a simple package specification works with and without accessible by clause.
I also tried the dbms_ddl.created_wrapped method like this:
BEGIN
sys.DBMS_DDL.create_wrapped ('CREATE OR REPLACE TYPE tp_test_internal
AUTHID DEFINER ACCESSIBLE BY (TYPE tp_test)
AS OBJECT
(
id INTEGER
);');
END;
/
This leads to ORA-24230 “input to DBMS_DDL.WRAP is not a legal PL/SQL unit” while doing this without the accessible by clause like this
BEGIN
sys.DBMS_DDL.create_wrapped ('CREATE OR REPLACE TYPE tp_test_internal
AUTHID DEFINER --ACCESSIBLE BY (TYPE tp_test)
AS OBJECT
(
id INTEGER
);');
END;
/
works as expected.
For me this looks like a bug. What do you think?
Thank you in advance,
best regards
Jan