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 1gN0ZF-0001F8-AI for pgsql-general@arkaria.postgresql.org; Wed, 14 Nov 2018 19:11:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gN0ZC-0004E4-Uo for pgsql-general@arkaria.postgresql.org; Wed, 14 Nov 2018 19:11:10 +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 1gN0ZC-0004Ck-81 for pgsql-general@lists.postgresql.org; Wed, 14 Nov 2018 19:11:10 +0000 Received: from mx1.riseup.net ([198.252.153.129]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gN0Z8-0000Bu-JX for pgsql-general@lists.postgresql.org; Wed, 14 Nov 2018 19:11:09 +0000 Received: from piha.riseup.net (piha-pn.riseup.net [10.0.1.163]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.riseup.net (Postfix) with ESMTPS id 8211D1A01E0 for ; Wed, 14 Nov 2018 11:11:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1542222663; bh=lpxOV0ex+wVS6VOfv449v7OVYZeQ4vWs/h3tSj20/ok=; h=Date:From:To:Subject:References:In-Reply-To:From; b=IyJ/nRAOvFltV/k1A7pylScK3kDVgpRh2Eu+aFwlBmkaPauO8u3Hh7zjODy73oue1 JcRAQduUFlCHYwxrhJO8gBAYZk9oxCkHc11gPuUYSoLBfLvst2RATP8TG2ZtvaYN9R taMRaZGKK+dKd2bVl+ekr/+I7lYR8pTts45t/avM= X-Riseup-User-ID: 2107D6A70EC5834C926F18870B18E05575C293A501ACDADEF421F148048CC8DE Received: from [127.0.0.1] (localhost [127.0.0.1]) by piha.riseup.net with ESMTPSA id BBEC866ABD for ; Wed, 14 Nov 2018 11:11:02 -0800 (PST) Date: Wed, 14 Nov 2018 20:11:00 +0100 From: Nicolas Paris To: pgsql-general@lists.postgresql.org Subject: Re: Default Privilege Table ANY ROLE Message-ID: <20181114190815.72lprnsyh4w7c67c@riseup.net> Mail-Followup-To: pgsql-general@lists.postgresql.org References: <20181114141608.ryvolxl7v7z2grzi@riseup.net> <787f53ab-01fc-f022-f699-b7a84e30d74e@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <787f53ab-01fc-f022-f699-b7a84e30d74e@gmail.com> Priority: normal List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Nov 14, 2018 at 10:05:51AM -0600, Ron wrote: > On 11/14/2018 08:19 AM, Nicolas Paris wrote: > > Hi > > > > I d'like my user be able to select on any new table from other users. > > > Would ROLE Groups solve your problem? Maybe yes, not sure what it is. I tested this: > create role myrolegroup; > ALTER DEFAULT PRIVILEGES FOR ROLE "myrolegroup" IN SCHEMA "myschema" GRANT select ON TABLES TO "myuser"; > create myuser1 inherit in role myrolegroup; > create myuser2 inherit in role myrolegroup; But if myuser2 creates a table, then myuser1 cannot select on it. I guess that's because inheritance only apply for GRANT (which is distinct from DEFAUL PRIVILEGE). Thanks, -- nicolas