1. Home
  2. Docs
  3. Oracle to PostgreSQL Migration
  4. PLSQL to plpgsql
  5. Migrate PL/SQL Packages

Migrate PL/SQL Packages

Packages in Oracle provide a mechanism to encapsulate related procedures, functions, and other program units. PostgreSQL does not have package but has schemas which can be leveraged to group related objects. Accessing objects also remain same and no application changes required.


As Oracle packages contain procedures and functions, you need to break the package into separate procedures and functions.

Few things you need to be careful while migrating a Oracle package to PostgreSQL

Oracle packages contain private and public members. Private members are local to the package. Unlike Oracle, PostgreSQL does not have private concept. Any function/procedure you create in PostgreSQL, becomes public by default.

Privileges, in Oracle are granted to packages. So when you break the package to separate procedures or functions, you need to apply same (or similar) privileges.

Was this article helpful to you? Yes No

How can we help?