Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ltcym-0005bT-6d for pgsql-admin@arkaria.postgresql.org; Wed, 16 Jun 2021 21:21:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ltcyl-0002Df-6h for pgsql-admin@arkaria.postgresql.org; Wed, 16 Jun 2021 21:21:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ltcyk-0002DX-UX for pgsql-admin@lists.postgresql.org; Wed, 16 Jun 2021 21:21:42 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ltcyj-0003rA-2F for pgsql-admin@lists.postgresql.org; Wed, 16 Jun 2021 21:21:42 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 15GLLZW8805164; Wed, 16 Jun 2021 17:21:35 -0400 From: Tom Lane To: Wells Oliver cc: Holger Jakobs , pgsql-admin@lists.postgresql.org Subject: Re: Baffled by basic permission issue. In-reply-to: References: <3AD88617-B7E7-4AF5-AE0B-05A79F88C2CC@jakobs.com> Comments: In-reply-to Wells Oliver message dated "Wed, 16 Jun 2021 14:01:05 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <805162.1623878495.1@sss.pgh.pa.us> Date: Wed, 16 Jun 2021 17:21:35 -0400 Message-ID: <805163.1623878495@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Wells Oliver 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