Skip to content

fix: replace alter routine with alter function|procedure #1333

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,10 @@ begin
foreach obj in array functions
loop
if obj->>'owner' = 'postgres' then
execute(format('alter routine %s(%s) owner to postgres;', (obj->>'oid')::regproc, pg_get_function_identity_arguments((obj->>'oid')::regproc)));
execute(format('alter %s %s(%s) owner to postgres;'
, case when obj->>'kind' = 'p' then 'procedure' else 'function'
, (obj->>'oid')::regproc
, pg_get_function_identity_arguments((obj->>'oid')::regproc)));
end if;
for rec in
select grantor, grantee, privilege_type, is_grantable
Expand Down
Loading