Re: Proposal: DROP ROLE ... REASSIGN OWNED TO ...
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Zach Manifold <zachlweaver00@gmail.com>, pgsql-hackers@postgresql.org
Date: 2026-04-25T01:12:56Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes: > This would fail if the user to be dropped owned objects in another > database, but your hypothetical version of DROP ROLE would have that > issue, too. Even if you couldn't wrap both commands in a single > transaction -- we have some DDL commands that are like that -- running > them one after another wouldn't lose much. So I'm just not sure I > really see the point. Yeah. We intentionally separated this functionality because the expectation is that you'll likely have to do REASSIGN OWNED in multiple databases before DROP ROLE will succeed. So I'm not much in favor of adding a combined command; it will just lead people to try to do things that won't work. regards, tom lane