Re: Oracle Packages vs PostgreSQL

  • From: Ray Stell <stellr@xxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Thu, 12 Jan 2017 11:42:37 -0500

On 1/12/17 11:34 AM, Joshua D. Drake wrote:


I was hoping someone on this list could help me understand the primary benefits of packages over standard Stored Procedures/UDFs (which PostgreSQL does have)?

Tom was the head ora evangelist:
https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:7452431376537

because packages

o break the dependency chain (no cascading invalidations when you install a new package body -- if you have procedures that call procedures -- compiling one will invalidate your database)

o support encapsulation -- I will be allowed to write MODULAR, easy to understand code -- rather then MONOLITHIC, non-understandable procedures

o increase my namespace measurably. package names have to be unique in a schema, but I can have many procedures across packages with the same name without colliding

o support overloading

o support session variables when you need them

o promote overall good coding techniques, stuff that lets you write code that is modular, understandable, logically grouped together....

Other related posts: