Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i89Sk-0007df-M4 for pgsql-general@arkaria.postgresql.org; Wed, 11 Sep 2019 20:43:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i89Si-0002gz-Rt for pgsql-general@arkaria.postgresql.org; Wed, 11 Sep 2019 20:43:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i89Si-0002co-EL for pgsql-general@lists.postgresql.org; Wed, 11 Sep 2019 20:43:36 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i89Sg-0004gg-5m for pgsql-general@postgresql.org; Wed, 11 Sep 2019 20:43:35 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x8BKhWnN018275; Wed, 11 Sep 2019 16:43:32 -0400 From: Tom Lane To: Miles Elam cc: PG-General Mailing List Subject: Re: REVOKE DROP rights In-reply-to: References: Comments: In-reply-to Miles Elam message dated "Wed, 11 Sep 2019 09:42:15 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18273.1568234612.1@sss.pgh.pa.us> Date: Wed, 11 Sep 2019 16:43:32 -0400 Message-ID: <18274.1568234612@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Miles Elam writes: > Is there any way to prevent a user from dropping a table when that user has > create rights? I'd like to allow that user to be able to create and delete > their own tables but not specific shared tables. I think maybe you didn't read the manual closely. Creation privileges cover the right to create an object (in a given database or schema), but only the creator/owner has the right to drop a particular object once it exists. We do grant the owner of a schema or database the right to drop objects within it, since they could surely achieve that result by dropping the whole schema or database. But merely having create privilege doesn't extend to that. So basically you want a shared schema that is owned by some trusted role, and your less-trusted roles have create (and usage!) on that schema. regards, tom lane