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.94.2) (envelope-from ) id 1tlUGT-00COd1-H8 for pgsql-general@arkaria.postgresql.org; Fri, 21 Feb 2025 14:44:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tlUGR-00AmPE-2d for pgsql-general@arkaria.postgresql.org; Fri, 21 Feb 2025 14:44:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tlUGQ-00AmP6-NN for pgsql-general@lists.postgresql.org; Fri, 21 Feb 2025 14:44:26 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tlUGO-002APj-1e for pgsql-general@lists.postgresql.org; Fri, 21 Feb 2025 14:44:26 +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 51LEiMTG3073945; Fri, 21 Feb 2025 09:44:22 -0500 From: Tom Lane To: Dominique Devienne cc: "David G. Johnston" , "pgsql-general@lists.postgresql.org" Subject: Re: DROP ROLE as SUPERUSER In-reply-to: References: <2705563.1740067550@sss.pgh.pa.us> <2765124.1740070338@sss.pgh.pa.us> <3072990.1740148436@sss.pgh.pa.us> Comments: In-reply-to Dominique Devienne message dated "Fri, 21 Feb 2025 15:35:19 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3073943.1740149062.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Fri, 21 Feb 2025 09:44:22 -0500 Message-ID: <3073944.1740149062@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Dominique Devienne writes: > On Fri, Feb 21, 2025 at 3:33 PM Tom Lane wrote: >> REASSIGN OWNED then DROP OWNED is the recommended path. > Hi. Am I missing something? foobar does not OWN anything in this case. > So I don't see how these recommendations are relevant to this particular > case. --DD DROP OWNED also removes relevant permission entries (which can be thought of as things owned by the role, if you hold your head at the right angle). See its man page. regards, tom lane