From: Tom Lane <tgl@sss.pgh.pa.us>
To: Wells Oliver <wells.oliver@gmail.com>
Cc: Holger Jakobs <holger@jakobs.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Baffled by basic permission issue.
Date: Wed, 16 Jun 2021 17:21:35 -0400
Message-ID: <805163.1623878495@sss.pgh.pa.us> (raw)
In-Reply-To: <CAOC+FBUvbGuZ5iY9bh8xCcrGt_fzMCfFJLkOfxn2bFypDuz1dg@mail.gmail.com>
References: <CAOC+FBV5TxsJ4CHTo60TYGDNU0Y1eM=XzrzHJNmSgpyFLdmqMg@mail.gmail.com>
<3AD88617-B7E7-4AF5-AE0B-05A79F88C2CC@jakobs.com>
<CAOC+FBUvbGuZ5iY9bh8xCcrGt_fzMCfFJLkOfxn2bFypDuz1dg@mail.gmail.com>
Wells Oliver <wells.oliver@gmail.com> writes:
> The role has SELECT perm on the view and on the underlying tables and I am
> received a permission denied table on the table while trying to select from
> the view. The view is owned by a different user but SELECT perms are very
> clearly granted to my role.
When you select from a view, you need permissions only on the view.
The view's owner needs permissions on the underlying table(s).
This is so that views can act as permission gateways.
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, wells.oliver@gmail.com, holger@jakobs.com, pgsql-admin@lists.postgresql.org
Subject: Re: Baffled by basic permission issue.
In-Reply-To: <805163.1623878495@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