Stephen Frost <sfrost@snowman.net> writes:
> Attached please find a patch to change how the permissions checking
> for alter-owner is done. With roles there can be more than one
> 'owner' of an object and therefore it becomes sensible to allow
> specific cases of ownership change for non-superusers.
Applied with minor revisions. The patch as submitted suffered a certain
amount of copy-and-paste-itis (eg, trying to use pg_type_ownercheck on
an opclass), and I really disliked using ACLCHECK_NOT_OWNER as the way
to report "you can't assign ownership to that role because you are not
a member of it". So I made a separate error message for that case.
regards, tom lane