Reputation: 3677
A co-worker at one point in time has defined a function in AWS Redshift. I have some doubts about its results and would like to see the code behind the function.
Is there any query I can do (or another method) that returns this code?
Upvotes: 10
Views: 9195
Reputation: 3677
Found the answer:
select * from pg_proc where proname ilike '%<function_name>%'
In the column: prosrc
you can find the function definition. It seemed empty in SQLWorkbenchJ, but the code revealed itself after a double-click.
Upvotes: 23