You can view the package specification and package body definition using the psql meta-commands \sps
and \spb
, respectively.
Synopsis
Creating and viewing a package and a package body
Create a package and a package body test_pkg
in the public
schema:
Use \sps
and \spb
commands to view the definition of package and package body:
Viewing function and procedure definitions
You can also view the definition of individual functions and procedures using the \sf
command.
Create the function and procedure:
Use the \sf <function_name/procedure_name>
command to view the definition: