I need to take all functions backup from postgreSQL using Pgadmin 4. I can't find any solutions far taking all functions backup, I have tried one solution but it returns only one function.
Asked
Active
Viewed 1,563 times
1
-
I don't think you can do it with PgAdmin 4 but you can do it with a query. See the answers to [this question](http://stackoverflow.com/questions/1347282/how-can-i-get-a-list-of-all-functions-stored-in-the-database-of-a-particular-sch). – Renzo May 03 '17 at 07:13
1 Answers
0
To create a script with the definitions of all functions in schema schemaname
, you could use:
SELECT pg_get_functiondef(f.oid) || E';\n'
FROM pg_proc f
JOIN pg_namespace n ON f.pronamespace = n.oid
WHERE n.nspname = 'schemaname';

Laurenz Albe
- 209,280
- 17
- 206
- 263