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 1gMxfz-0007xJ-Op for pgsql-general@arkaria.postgresql.org; Wed, 14 Nov 2018 16:06:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gMxfx-0007eD-G2 for pgsql-general@arkaria.postgresql.org; Wed, 14 Nov 2018 16:05:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gMxfx-0007e5-2Z for pgsql-general@lists.postgresql.org; Wed, 14 Nov 2018 16:05:57 +0000 Received: from mail-oi1-x22d.google.com ([2607:f8b0:4864:20::22d]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gMxfu-0007cQ-K9 for pgsql-general@lists.postgresql.org; Wed, 14 Nov 2018 16:05:55 +0000 Received: by mail-oi1-x22d.google.com with SMTP id g188-v6so14011079oif.8 for ; Wed, 14 Nov 2018 08:05:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=/9z/AQjf3Z4xNlIbzRxbAkdutKRmg1gosAWsaBtb7uI=; b=NBvId/d9HyrQsjO915U/uY/otEjSkLFEWldeoTCNH68dZelWZZwSRa1+DWRP+ZNRva rcjo5Hi4U+3zRBRGZSYfE4dw7qaRGhFui1LvhfX+v0mhvc7yrl4tzS9Tdc3JXmtS08um 9d/iFsUj6RNZ2MPZn46mGUGP8lQA6IExyRmQTWXPZN7TQWbu+hJSOIVE3OmtrBg0VrOw CewMDp3EaYhMZN+5yyYv946U8CvkmSyrWiSiek3sPkr5LDdCSyznnXV+J8Ww8HMeYmWY EX6CxodkA6qsscn8kCP4vf7+ExrLtJmuzcv99EUE+rOPzYIDaKSknppUBQZryAi/kace 4Jkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=/9z/AQjf3Z4xNlIbzRxbAkdutKRmg1gosAWsaBtb7uI=; b=kwI8hmTNj76CjUNEAw1U42Aw3rPvJ7TfvC1zdSNihSpT+q7I2IDLPbM5JuSMdGDNLA h+NjLpThozeSmacU4LPM9EodgQaQBEOe0ujX4V2mtoB2eI7hrrrDLNZ7FKmfCcaBIW10 D+6Es/2WnpnSTb3HhnyjQFqbZhVBpdCkPRgk3nNaYu7p+bFS6dxNVBPJO7ZaTil7FQep angG6m9flHEr6WvL1TPPJXeBnvxWwHenLOjs9BIXbLNOSo1oDI9PyH1NEUBHHj/AYvcy PTs/KWmIflBc2kdNS+5hBaGawl0uDtbnFngAfz7rV3XjsDqqJOPsIVaxTWEiKFPUqV5A GNmA== X-Gm-Message-State: AGRZ1gJiiZ4GLPbDhy1lfVP+erYHkRQMCWUgPtMlIYuzqur0qVxsi2xM 3sN3EpdOfHxzsKGzUebZ/e1++pIa X-Google-Smtp-Source: AJdET5f4hBL2Dz90kwlUrNYdhVrF49ywru43qHHxN+hrcCI0467sX7648gRo1ESMkCHnrX4MGQvs4w== X-Received: by 2002:aca:3a08:: with SMTP id h8-v6mr1327188oia.84.1542211553293; Wed, 14 Nov 2018 08:05:53 -0800 (PST) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id z16sm8271120otc.22.2018.11.14.08.05.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 08:05:52 -0800 (PST) Subject: Re: Default Privilege Table ANY ROLE To: pgsql-general@lists.postgresql.org References: <20181114141608.ryvolxl7v7z2grzi@riseup.net> From: Ron Message-ID: <787f53ab-01fc-f022-f699-b7a84e30d74e@gmail.com> Date: Wed, 14 Nov 2018 10:05:51 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181114141608.ryvolxl7v7z2grzi@riseup.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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. > >> ALTER DEFAULT PRIVILEGES FOR ROLE "theowner1" IN SCHEMA "myschema" GRANT select ON TABLES TO "myuser" >> ALTER DEFAULT PRIVILEGES FOR ROLE "theowner2" IN SCHEMA "myschema" GRANT select ON TABLES TO "myuser" >> ... > > Do I really have to repeat the command for all users ? > > The problem is I have many user able to create tables and all of them > have to read each other. Would ROLE Groups solve your problem? -- Angular momentum makes the world go 'round.