Fix bug in DROP OWNED BY.
authorRobert Haas <rhaas@postgresql.org>
Wed, 28 Sep 2022 14:42:07 +0000 (10:42 -0400)
committerRobert Haas <rhaas@postgresql.org>
Wed, 28 Sep 2022 14:42:07 +0000 (10:42 -0400)
commit7188b9b0fdbb4dd99915626f171d820a56b98514
treee947bb56eebcc21541d93e5a3b51914db5d2efb5
parenta448e49bcbe40fb72e1ed85af910dd216d45bad8
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
src/backend/catalog/pg_shdepend.c
src/bin/scripts/t/020_createdb.pl