Created
September 15, 2016 18:50
-
-
Save kishorevaishnav/15945605da1e9c520ce803a593ede953 to your computer and use it in GitHub Desktop.
ALTER FUNCTION OWNER
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT 'ALTER FUNCTION '||p.proname || '('||oidvectortypes(p.proargtypes)||') OWNER TO "'||current_catalog||'";' | |
FROM pg_catalog.pg_proc p | |
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace | |
WHERE pg_catalog.pg_function_is_visible(p.oid) | |
AND n.nspname <> 'pg_catalog' | |
AND n.nspname <> 'information_schema' | |
AND p.probin IS NULL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment