Skip to content

sys.procedure

A system view that returns information about the user-defined stored procedures in the database.

Column NameData TypeDescription
procedure_idbigintUnique ID of the stored procedure.
database_idbigintUnique ID of the database where the procedure was created.
schema_idbigintUnique ID of the schema where the view was created. Join to sys.schema to get the schema name.
nametextName of the stored procedure.
definitiontextSignature of the stored procedure, including the data type of each parameter.
creation_timetimestamptzWhen the procedure was created.
database_nametextName of the database where the procedure was created.

For example:

premdb=# select * from sys.procedure;                                                                                                                                            procedure_id | database_id | schema_id |      name       |                 definition                  |         creation_time         | database_name 
--------------+-------------+-----------+-----------------+---------------------------------------------+-------------------------------+---------------
       19120 |       16395 |      2200 | addteam         | addteam(character varying)                  | 2020-02-17 20:42:52.749904-08 | premdb
       19121 |       16395 |      2200 | insert_hometeam | insert_hometeam(integer, character varying) | 2020-02-17 20:43:03.993084-08 | premdb
(2 rows)

Parent topic:System Views