Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZFoY4-0006jM-BQ for pgsql-admin@arkaria.postgresql.org; Thu, 16 Jul 2015 19:10:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZFoY2-0006SL-Vx for pgsql-admin@arkaria.postgresql.org; Thu, 16 Jul 2015 19:10:23 +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_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZFoY2-0006Rd-5V for pgsql-admin@postgresql.org; Thu, 16 Jul 2015 19:10:22 +0000 Received: from internet06.ebureau.com ([65.127.24.25]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZFoXu-0005cP-Gj for pgsql-admin@postgresql.org; Thu, 16 Jul 2015 19:10:21 +0000 Received: from localhost (localhost [127.0.0.1]) by internet06.ebureau.com (Postfix) with ESMTP id 962253EFD016; Thu, 16 Jul 2015 14:10:11 -0500 (CDT) X-Virus-Scanned: amavisd-new at ebureau.com Received: from internet06.ebureau.com ([127.0.0.1]) by localhost (internet06.ebureau.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3pXcwW6k0ySZ; Thu, 16 Jul 2015 14:10:11 -0500 (CDT) Received: from [10.10.20.243] (unknown [10.10.20.243]) by internet06.ebureau.com (Postfix) with ESMTPSA id 06EDC3EFCFFA; Thu, 16 Jul 2015 14:10:10 -0500 (CDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Subject: Re: postgres_fdw user mapping and role inheritance From: Natalie Wenz In-Reply-To: <4969.1437070567@sss.pgh.pa.us> Date: Thu, 16 Jul 2015 14:10:09 -0500 Cc: Tom Lane Content-Transfer-Encoding: quoted-printable Message-Id: <32B4D87F-0466-467A-9F2B-00F696E9E056@ebureau.com> References: <2EBBB4BA-B1C9-4978-8182-F35F8831FD0E@ebureau.com> <4969.1437070567@sss.pgh.pa.us> To: "pgsql-admin@postgresql.org" X-Mailer: Apple Mail (2.2102) X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Would it be necessary to disambiguate? Wouldn't individual_user's privilege= s be a union of all of the privileges of all the groups of which it is a pa= rt? That seems to be how it works in the core postgres functionality: If local_group_1 is a role with privileges on table_a and table_b, and loca= l_group_2 is a role with privileges on table_c, then after grant local_group_1 to individual_user; grant local_group_2 to individual_user; individual_user now has privileges on table_a, table_b, and table_c. But if local_group_2 also has a user mapping on foreign_table_x, individual= _user inherits the privileges on table_c, but not foreign_table_x.=20 Or am I misunderstanding you? Is there something about foreign tables that = precludes the role inheritance from working the same way it does with nativ= e tables? Thanks, Natalie > On Jul 16, 2015, at 1:16 PM, Tom Lane wrote: >=20 > Natalie Wenz writes: >> Is there a way to tell postgres_fdw to allow individual_user to inherit >> user mappings from groups of which it is a part? >=20 > No. How would you disambiguate if the current role were a member of > multiple groups? >=20 > regards, tom lane --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin