Fix bug in DROP OWNED BY.

Robert Haas <rhaas@postgresql.org>

Commit: 7188b9b0fdbb4dd99915626f171d820a56b98514
Author: Robert Haas <rhaas@postgresql.org>
Date: 2022-09-28T14:42:07Z
Releases: 16.0
Fix bug in DROP OWNED BY.

Commit 6566133c5f52771198aca07ed18f84519fac1be7 broke the case where
the role passed to DROP OWNED BY owns a database.

Report by Rushabh Lathia, who also provided a patch, but this patch
takes a slightly different approach to fixing the problem.

Discussion: http://postgr.es/m/CAGPqQf2vO+nbo=3yAdZ8v26Rbug7bY4YjPaPLZx=L1NZ9-CC3w@mail.gmail.com

Files

PathChange+/−
src/backend/catalog/pg_shdepend.c modified +19 −10
src/bin/scripts/t/020_createdb.pl modified +18 −0

Discussion