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 1odd5D-0003G1-ES for pgsql-general@arkaria.postgresql.org; Wed, 28 Sep 2022 19:51:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1odd4E-0005vl-4E for pgsql-general@arkaria.postgresql.org; Wed, 28 Sep 2022 19:50:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1odd4D-0005vL-P8 for pgsql-general@lists.postgresql.org; Wed, 28 Sep 2022 19:50:01 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1odd4B-0002Wh-9r for pgsql-general@lists.postgresql.org; Wed, 28 Sep 2022 19:50:01 +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 28SJnuPN4031155; Wed, 28 Sep 2022 15:49:56 -0400 From: Tom Lane To: Ted Toth cc: pgsql-general@lists.postgresql.org Subject: Re: table inheritance and privileges In-reply-to: References: Comments: In-reply-to Ted Toth message dated "Wed, 28 Sep 2022 14:17:21 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4031153.1664394596.1@sss.pgh.pa.us> Date: Wed, 28 Sep 2022 15:49:56 -0400 Message-ID: <4031154.1664394596@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Ted Toth writes: > I'm dynamically creating tables that inherit from another table but > they don't inherit the access privileges. Is there a way to have the > new tables inherit their parent tables access privileges? No, but do you need that? When accessing the parent table, there's no need for privileges on individual children --- we only check tables(s) directly named in the query. regards, tom lane