pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedCreate user mapping for role
2+ messages / 2 participants
[nested] [flat]
* Create user mapping for role
@ 2020-05-13 13:44 Gerard Weatherby <gerardw@alum.mit.edu>
0 siblings, 1 reply; 2+ messages in thread
From: Gerard Weatherby @ 2020-05-13 13:44 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
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 …
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Create user mapping for role
@ 2020-05-13 14:45 Tom Lane <tgl@sss.pgh.pa.us>
parent: Gerard Weatherby <gerardw@alum.mit.edu>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2020-05-13 14:45 UTC (permalink / raw)
To: Gerard Weatherby <gerardw@alum.mit.edu>; +Cc: pgsql-general@lists.postgresql.org
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2020-05-13 14:45 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13 13:44 Create user mapping for role Gerard Weatherby <gerardw@alum.mit.edu>
2020-05-13 14:45 ` Tom Lane <tgl@sss.pgh.pa.us>
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