Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZFnYt-0004GZ-JI for pgsql-admin@arkaria.postgresql.org; Thu, 16 Jul 2015 18:07:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZFnYs-0000tY-WF for pgsql-admin@arkaria.postgresql.org; Thu, 16 Jul 2015 18:07:11 +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 1ZFnYs-0000tS-M5 for pgsql-admin@postgresql.org; Thu, 16 Jul 2015 18:07:10 +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 1ZFnYp-0004QU-Jp for pgsql-admin@postgresql.org; Thu, 16 Jul 2015 18:07:10 +0000 Received: from localhost (localhost [127.0.0.1]) by internet06.ebureau.com (Postfix) with ESMTP id 93B523EFB691 for ; Thu, 16 Jul 2015 13:07:04 -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 Gb_7EYHDNHsX for ; Thu, 16 Jul 2015 13:07:04 -0500 (CDT) Received: from [10.10.20.243] (unknown [10.10.20.243]) by internet06.ebureau.com (Postfix) with ESMTPSA id 14FD63EFB685 for ; Thu, 16 Jul 2015 13:07:04 -0500 (CDT) From: Natalie Wenz Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: postgres_fdw user mapping and role inheritance Message-Id: <2EBBB4BA-B1C9-4978-8182-F35F8831FD0E@ebureau.com> Date: Thu, 16 Jul 2015 13:07:02 -0500 To: "pgsql-admin@postgresql.org" Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) 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 Hi all, We're looking at using postgres_fdw, and while setting it up for a test usi= ng postgres 9.4.4, I noticed that it doesn't seem to honor role inheritance= .=20 For example, having created foreign_server:=20 create role local_group with nologin; create role individual_user;=20 grant local_group to individual_user; create user mapping for local_group server foreign_server options (user 'foreign_user', password ''); create foreign table foreign_table (id serial, data text)=20 server foreign_server options (schema_name 'some_schema', table_name 'some_table'); When I tried this, individual_user could not select from foreign_table, eve= n though I expected individual_user to inherit from local_group: select * from foreign_table; ERROR: user mapping not found for "individual_user" It did work when I created a user mapping for individual_user (to verify th= at I had the other parts set up correctly): create user mapping for individual_user server foreign_server options (user 'foreign_user', password ''); Am I missing something? Is there a way to tell postgres_fdw to allow indivi= dual_user to inherit user mappings from groups of which it is a part? Is th= ere a reason that it doesn't allow it, or is it a bug or something that has= n't been implemented yet? (Will it be fixed or implemented in postgres 9.5?= )=20 Many thanks, Natalie --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin