For someone like me who moved to Postgresql from Oracle or Microsoft SQL Server, Stored procedure was most sought after feature in Postgres. There are many benefits of Stored procedure over function.
Starting Postgress 11, Postgres now supports creation and execution of stored procedure. As developers continue to unleash the power of stored procedure they will certainly be thankful to Postgres and Postgres community. On this post, we’ll see how to list all the created stored procedures in your database.
Just like functions, we can query the list of stored procedures from information_schema.routines view. Below is the query to view list of stored procedures.
SELECT
specific_catalog,
routine_schema,
routine_name
FROM
information_schema.routines
WHERE
routine_type='PROCEDURE';