Components of a package
Updated at:
A PolarDB for PostgreSQL (Compatible with Oracle) package consists of two components:
- Package specification — the public interface for a package. All public elements declared in the specification are accessible from outside the package. The specification declares all database objects that are included as part of the package.
- Package body — the implementation of everything declared in the package specification. It holds implementation details and private declarations that are invisible to external applications.
The package body implements the specifications defined in the package specification. Because the implementation details are hidden from calling programs, you can debug, enhance, or replace the package body without changing the specifications — and change it without recompiling those programs.
Is this page helpful?