I suggest you ...

pl/sql packages (like Oracle)

developer feature for clustering my scripts into logical units.

429 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    cgraefe shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    5 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • John O. commented  ·   ·  Flag as inappropriate

        The reason that schemas are insufficient is that many third-party applications use both schemas and packages. We could maybe start thinking about migrating these away from Oracle, but not when there are no packages. I know of one ERP application that has dozens of schemas each with dozens or hundreds of packages. Packages are the last major feature required to explore whether migration is possible or practical. I support improving it, if they could be nested N-deep or whatever, that's fine. But just saying "use something else" is a non-solution.

      • Darren Duncan commented  ·   ·  Flag as inappropriate

        From the perspective of having code reuse, the "extensions" feature added by Postgres 9.1 would seem to provide that already, to some degree. Not a full solution, but it can meet some of the needs.

      • Darren Duncan commented  ·   ·  Flag as inappropriate

        In principle an Oracle package is just a namespace, same as a SQL schema. So why not just use a SQL schema to group these related things together? I do. On the other hand, if the desire is to have either multi-level namespaces or private global variables, I think this would be better implemented in a more general sense, either by letting SCHEMA have private global variables / etc, or supporting a more generalized multi-level namespace. Just supporting exactly 2 levels in the schema+package sense is rather a kludge.

      • Антон Б. commented  ·   ·  Flag as inappropriate

        i think it may be not PL/SQL

        but incapsulation, global variables and constants are very helpfull Oracle features

      Feedback and Knowledge Base