Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ovoZ1-0000iY-1p for pgsql-general@arkaria.postgresql.org; Thu, 17 Nov 2022 23:44:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ovoYz-0005A7-Ke for pgsql-general@arkaria.postgresql.org; Thu, 17 Nov 2022 23:44:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ovoYz-00059y-8Y for pgsql-general@lists.postgresql.org; Thu, 17 Nov 2022 23:44:57 +0000 Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ovoYx-0007E1-2w for pgsql-general@lists.postgresql.org; Thu, 17 Nov 2022 23:44:56 +0000 Received: by mail-oi1-x235.google.com with SMTP id m204so3664194oib.6 for ; Thu, 17 Nov 2022 15:44:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=RmgsjZ9fwDjbmbqBIfDUBn1WzcRkJH+WzFmgYbOuBA4=; b=a+3tgc85UW438YTS07MbEuqZQuGr/TcsTzlQUYTnOrdsleEO8/+A1foy5r0x7WpS9E ME6KnukfPw2QzRklhnAeLbUgrNVaEZE3w1QpnRFJPuvThzhYaJI5ELnsba7AVwXGSXtL F+x5pw2RAn9MjontIfwjZFneZYAwYuwfrrXupjfBzgU0g8aV3y0vJITiCIQiYmY0N3qa S58JxImETZV5P59cQOA3szktLfF3lyN2X/xLv3Uo1/FKDgoL63R/wlvz4fbDHIvaTtC2 FjzLjcTPUT9vHQwiGmCzFAAcohUjfnYZzFmNX1j0PRrrGH+P3iiG6d1CWJjBISYWY5Wa CdxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RmgsjZ9fwDjbmbqBIfDUBn1WzcRkJH+WzFmgYbOuBA4=; b=6u/ofyn2JJox5iVO5j1AbgutQyndy5tW881wLKRck1f9qb4fzIoexrBQ+zWDR+nYV5 qNsKxqKEZorJ1JbC4SuqCcDtnP5Z+FZeAEaCoJHuBTPVg5Ecgfj3vxUqC9fJKnCsrnFa /nBfjDhKe8yKB+Q4HZm5AGAsawQ+/VXpjELTNmWhM9n9B4UuMPs+zQnKENV7XLBCRSJM GhOsoRXikfTFu8QBzih41pTGKRlmLrzoztOhwelxhgHGrl/lo1Mij3V5BWg9r4X+oJvA kapJF0NfunnhT6IsYiK20Z3XhqgtCiyOAldoTXVHopyJ3QCjBU+G8E3Q8x3JLHgr0Kd+ VxLg== X-Gm-Message-State: ANoB5pnL+KnV70m5MSGD4AGEenyc2KSSCQiVwC5XvNi9zUVX/pSKxsRC Fin1OBmIq3NNUQUi971ZmHKUT0bnrYQ= X-Google-Smtp-Source: AA0mqf7lvIsjzERFrI3yylpX4R83FZp3VUYhdD9dB2BugPXS/0a1vYF/LpwYFJghj0ZzyvBHmaRF6Q== X-Received: by 2002:a05:6808:906:b0:35a:d208:fd86 with SMTP id w6-20020a056808090600b0035ad208fd86mr5223973oih.108.1668728692665; Thu, 17 Nov 2022 15:44:52 -0800 (PST) Received: from ?IPV6:2600:1700:bd2c:b810::43? ([2600:1700:bd2c:b810::43]) by smtp.googlemail.com with ESMTPSA id j23-20020a056870169700b0011f400edb17sm1197416oae.4.2022.11.17.15.44.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Nov 2022 15:44:52 -0800 (PST) Message-ID: <165fba28-443f-c981-ba06-a996b8c81969@gmail.com> Date: Thu, 17 Nov 2022 17:44:51 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: Drop role cascade ? To: pgsql-general@lists.postgresql.org References: <2058701.1668727016@sss.pgh.pa.us> Content-Language: en-US From: Ron In-Reply-To: <2058701.1668727016@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/17/22 17:16, Tom Lane wrote: > David Gauthier writes: >> Someone who had privileges in a lot of tables/schemas/DBs left the >> company. I want to drop that role but "rop role xxx" won't let me >> because... "xxx cannot be dropped because some objects depend on it". >> Is there a way to just get rid of this role without revoking xxx in all >> the individual DB objects he has privs too? Something like "drop role xxx >> cascade" ? > Not directly, but see REASSIGN OWNED and DROP OWNED. SIMULATE and VERBOSE options would be handy, to see what those commands would actually do. -- Angular momentum makes the world go 'round.