Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wGRat-006E0P-29 for pgsql-hackers@arkaria.postgresql.org; Sat, 25 Apr 2026 01:14:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wGRZs-0084LE-17 for pgsql-hackers@arkaria.postgresql.org; Sat, 25 Apr 2026 01:13:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wGRZs-0084L6-0C for pgsql-hackers@lists.postgresql.org; Sat, 25 Apr 2026 01:13:00 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wGRZp-00000002et1-2BUH for pgsql-hackers@postgresql.org; Sat, 25 Apr 2026 01:12:58 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 63P1Cu4n1861861; Fri, 24 Apr 2026 21:12:56 -0400 From: Tom Lane To: Robert Haas cc: Zach Manifold , pgsql-hackers@postgresql.org Subject: Re: Proposal: DROP ROLE ... REASSIGN OWNED TO ... In-reply-to: References: Comments: In-reply-to Robert Haas message dated "Fri, 24 Apr 2026 20:29:43 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1861859.1777079576.1@sss.pgh.pa.us> Date: Fri, 24 Apr 2026 21:12:56 -0400 Message-ID: <1861860.1777079576@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas 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