From: Tom Lane <tgl@sss.pgh.pa.us>
To: Gerard Weatherby <gerardw@alum.mit.edu>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Create user mapping for role
Date: Wed, 13 May 2020 10:45:35 -0400
Message-ID: <505.1589381135@sss.pgh.pa.us> (raw)
In-Reply-To: <F33D8460-2C6C-4B11-B113-7B23FD65EE60@alum.mit.edu>
References: <F33D8460-2C6C-4B11-B113-7B23FD65EE60@alum.mit.edu>
Gerard Weatherby <gerardw@alum.mit.edu> writes:
> Can a foreign data wrapper user mapping by created for multiple users via a role? i.e. if bob, sally, and john belong to role foreigusers, is it possible to do something like
> Create user mapping for foreignusers server …
You can certainly create a user mapping for a role. But I think you'll
find that sally et al have to do "SET ROLE foreignusers" to use it.
It's difficult to see a way to avoid that --- after all, if sally is
also a member of foreignuserstoo that also has a mapping, which one
should the system use?
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, gerardw@alum.mit.edu
Subject: Re: Create user mapping for role
In-Reply-To: <505.1589381135@sss.pgh.pa.us>
References: <F33D8460-2C6C-4B11-B113-7B23FD65EE60@alum.mit.edu> <505.1589381135@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox