Re: Create user mapping for role

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gerard Weatherby <gerardw(at)alum(dot)mit(dot)edu>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Create user mapping for role
Date: 2020-05-13 14:45:35
Message-ID: 505.1589381135@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Gerard Weatherby <gerardw(at)alum(dot)mit(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2020-05-13 14:57:30 Re: Why is it that “aggregate functions are not allowed in FROM clause of their own query level”?
Previous Message Basques, Bob (CI-StPaul) 2020-05-13 14:18:24 RE: Enforcing uniqueness on [real estate/postal] addresses