Under terms of this task we'll implement a subset of PACKAGE related functionality described in
The full grammar looks like:
Under terms of this task we'll implement:
Instead of storing package definitions in a new system table, packages will be translated to databases. So for example, CREATE PACKAGE p1 will actually create a new database p1, and all package routines will be translated to routines of the database p1.
Limitations and features of this task:
- CREATE PACKAGE won't include the invoker_rights_clause
- PACKAGE related statements won't have the optional schema name clause
- plsql_package_spec and pgsql_package_body will understand only functions and procedures at this point (no other object types, such as exceptions, package wide variables, etc)
- CREATE PACKAGE will check routine specifications for correct syntax, but will just ignore them. If CREATE PACKAGE BODY does not match CREATE PACKAGE, no errors will happen.
- Routines declared as internal (private) body routines will be publicly accessible.
- Packages will reuse the same name space with schema (database) names. Packages will reside on the same level with schemas, not inside schemas. So two different users won't be able to create packages with the same names.
- CREATE PACKAGE and CREATE PACKAGE BODY won't have the OR REPLACE clause
- CREATE PACKAGE will have the optional IF NOT EXISTS clause
- DROP PACKAGE will have an optional IF EXISTS clause