Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uf3L3-001VeF-Ls for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Jul 2025 21:18:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uf3L2-00BOSS-LX for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Jul 2025 21:18:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uf3L2-00BOSE-Df for pgsql-bugs@lists.postgresql.org; Thu, 24 Jul 2025 21:18:52 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uf3L1-000c9k-0E for pgsql-bugs@lists.postgresql.org; Thu, 24 Jul 2025 21:18:51 +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 56OLIoWn1746232; Thu, 24 Jul 2025 17:18:50 -0400 From: Tom Lane To: lacanoid@ljudmila.org cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18998: No materialized views in INFORMATION_SCHEMA.TABLE_PRIVILEGES In-reply-to: <18998-d0b1ca418d70eed4@postgresql.org> References: <18998-d0b1ca418d70eed4@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Thu, 24 Jul 2025 17:50:36 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1746230.1753391930.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Thu, 24 Jul 2025 17:18:50 -0400 Message-ID: <1746231.1753391930@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > View NFORMATION_SCHEMA.TABLE_PRIVILEGES contains information for views and > tables, but not materialized views. I found this to be somewhat unexpected. > Since materialized views are conceptually somewhere between views and > tables, it would perhaps make sense to include them. > The standard of course doesn’t say anything about this because it does not > deal with materialized views at all. Yeah, precisely. Our take on the information schema is that it should show what the standard says, and thus objects that are outside the standard should not appear there at all. Obviously that's a bit of a judgment call, but it saves us from having to make a bunch of other judgment calls about just how much we'd want to warp the information schema's behavior. For example, in the case at hand it'd be darn weird for matviews to be reflected in TABLE_PRIVILEGES but not TABLES, so then we'd have to allow a nonstandard value of TABLES.TABLE_TYPE, and then we're already some way down the slippery slope to something that claims to be the information schema but contains much that a standards-compliant client wouldn't know what to do with. regards, tom lane