According to this documentation (https://docs.oracle.com/cd/E11882_01/appdev.112/e25519/whatsnew.htm#LNPLS110 ) I understand that a package with only constants would not result in statefullness.
This should be true from 11.2.0.2 and higher.
But in our environment I get ORA-04068 with a Package like this:
create or replace PACKAGE pkg_state
AS
gv_test constant varchar(50) := 'Test!';
FUNCTION get_variable
RETURN VARCHAR2;
END pkg_state;
/
create or replace PACKAGE BODY pkg_state
AS
FUNCTION get_variable
RETURN VARCHAR2
AS
BEGIN
RETURN 'TRUE';
END get_variable;
END pkg_state;
/
This should be a stateless package in my opinion according to the documentation. Still behaves statefull in the following setup:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
"CORE 11.2.0.4.0 Production"
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
Am I missing something?