You can view the package specification and package body definition using the psql meta-commands \sps
and \spb
, respectively.
Synopsis
Examples
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:
You can also view the definition of individual functions and procedures using the \sf
command.
Examples
Create the function and procedure:
Use the \sf <function_name/procedure_name>
command to view the definition: