I am doing an audit and amending usernames in our postgres database (9.6) environment.
I can amend the user to a new username via the ALTER USER name RENAME TO new_name command however I want to also amend the ownership of the user on any objects they may have to the new renamed user.
If I rename the user I am then unable to make the ownership change as the old username would no longer exist.
Is there a way round this? or would it simply be easier to create a brand new username and move the ownership to the new username and then delete the old username.