I compiled a package in Oracle SQL Developer and some of my procedures have a rather pale / light colored icon (I am not allowed to add a picture). I am not really familiar with Oracle SQL Developer and googled around but couldn't find any list or legend of all symbols. What does it mean when the procedure has the light icon instead of the clearly colored icon?
Checked help center and hovered over the icon, but didn't give any helpful information. Other stack overflow questions only explain the green dot / bug icon meaning.
If you're looking at the object viewer, private procedures (and functions) are shown with a paler icon than public ones.
Public procedures and functions are those that are declared in the package specification and then defined in the package body. You can call those from outside the package.
Private procedures and functions are only declared and defined in the package body, and do not appear in the specification. Those cal only be called from within the package, not by anything outside it.
As a simple example, if I create a dummy package with:
create or replace package test_package as
create or replace package body test_package as
-- forward declaration of private procedure
-- public (declared in specification) so visible externally
procedure public_procedure is
-- private so not visible externally
procedure private_procedure is
then the object viewer shows the public procedure with a 'normal' icon in both the specification and body, and the private function declaration and definition as paler icons, and only in the body:
(You don't usually need to declare private procedures at all, but you do if the definition appears after the first call in the package body, so I've set my code up like that to demonstrate that both are shown with pale icons.)
I can call the public procedure from an anonymous block:
PL/SQL procedure successfully completed.
and attempting to call the private one fails as expected:
BEGIN test_package.private_procedure; END;
Error report -
ORA-06550: line 1, column 20:
PLS-00302: component 'PRIVATE_PROCEDURE' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored