• Alvaro Herrera's avatar
    Have REASSIGN OWNED work on extensions, too · 0c7b9dc7
    Alvaro Herrera authored
    Per bug #6593, REASSIGN OWNED fails when the affected role has created
    an extension.  Even though the user related to the extension is not
    nominally the owner, its OID appears on pg_shdepend and thus causes
    problems when the user is to be dropped.
    
    This commit adds code to change the "ownership" of the extension itself,
    not of the contained objects.  This is fine because it's currently only
    called from REASSIGN OWNED, which would also modify the ownership of the
    contained objects.  However, this is not sufficient for a working ALTER
    OWNER implementation extension.
    
    Back-patch to 9.1, where extensions were introduced.
    
    Bug #6593 reported by Emiliano Leporati.
    0c7b9dc7
pg_shdepend.c 38.4 KB