Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1euS6C-0002SS-Dt for pgsql-general@arkaria.postgresql.org; Sat, 10 Mar 2018 00:10:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1euS6A-0005xS-21 for pgsql-general@arkaria.postgresql.org; Sat, 10 Mar 2018 00:10:54 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1euS69-0005xG-ND for pgsql-general@lists.postgresql.org; Sat, 10 Mar 2018 00:10:53 +0000 Received: from eastrmfepo103.cox.net ([68.230.241.215]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1euS65-00019V-QE for pgsql-general@lists.postgresql.org; Sat, 10 Mar 2018 00:10:52 +0000 Received: from eastrmimpo109.cox.net ([68.230.241.222]) by eastrmfepo103.cox.net (InterMail vM.8.01.05.28 201-2260-151-171-20160122) with ESMTP id <20180310001048.QGNK22712.eastrmfepo103.cox.net@eastrmimpo109.cox.net> for ; Fri, 9 Mar 2018 19:10:48 -0500 Received: from [192.168.1.10] ([70.171.109.83]) by eastrmimpo109.cox.net with cox id L0Ao1x0031o04Vy010Aoxd; Fri, 09 Mar 2018 19:10:48 -0500 X-Authority-Analysis: v=2.2 cv=VI2tp5HX c=1 sm=1 tr=0 a=uCHdjGDeLqaieW9t8IbZ6A==:117 a=uCHdjGDeLqaieW9t8IbZ6A==:17 a=IkcTkHD0fZMA:10 a=x7bEGLp0ZPQA:10 a=T11QR6bd6vIA:10 a=kviXuzpPAAAA:8 a=2PQCzthW6whDPGGlXkcA:9 a=QEXdDO2ut3YA:10 a=qrIFiuKZe2vaD64auk6j:22 X-CM-Score: 0.00 Authentication-Results: cox.net; auth=pass (PLAIN) smtp.auth=ron.l.johnson@cox.net Subject: Re: Ability to create tables To: pgsql-general@lists.postgresql.org References: <2b6740bf-cab4-6ddf-2928-665d632efb41@cox.net> From: Ron Johnson Message-ID: <32d6785b-a92d-b1f7-a72d-8790892ce259@cox.net> Date: Fri, 9 Mar 2018 18:10:47 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 03/09/2018 05:46 PM, Tom Lane wrote: > Ron Johnson writes: >> Even though I revoked the  CREATE priv on role ABCREADONLY, it's still able >> to create tables.  What can I do to prevent this? >> $ psql -c 'revoke create on database "ABC123" from "ABCREADONLY";' > That revokes the ability to create new schemas within that database > (which I suspect the role did not have anyway). What you need is > to remove its ability to create objects within the public schema > within that database. By default, that ability is granted to PUBLIC, > so that "revoke create on schema public from "ABCREADONLY";" won't > help either. What you have to do is "revoke create on schema public > from public", and then grant it back to just the roles that should have > it. > > If you don't want the role creating temp tables either, you need to > revoke its TEMP right on the database (which *is* a database-level > privilege). Again, this'll involve disallowing that to PUBLIC, > since that default grant is how it's getting the privilege. Thanks. -- Angular momentum makes the world go 'round.