Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list all the stored procedure in AWS RedShift

I was checking this, but not find the proper one. So I prepared one and sharing that query here.

like image 653
TheDataGuy Avatar asked Jun 08 '20 08:06

TheDataGuy


1 Answers

SELECT
    n.nspname,
    b.usename,
    p.proname,
    p.prosrc
FROM
    pg_catalog.pg_namespace n
JOIN pg_catalog.pg_proc p ON
    pronamespace = n.oid
join pg_user b on
    b.usesysid = p.proowner
where
    nspname not in ('information_schema',
    'pg_catalog')
like image 194
TheDataGuy Avatar answered Sep 26 '22 21:09

TheDataGuy