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 1p1FCM-0001oD-CR for pgsql-general@arkaria.postgresql.org; Fri, 02 Dec 2022 23:12:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p1FCK-0001VP-7I for pgsql-general@arkaria.postgresql.org; Fri, 02 Dec 2022 23:12:00 +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 1p1FCJ-0001VB-TI for pgsql-general@lists.postgresql.org; Fri, 02 Dec 2022 23:11:59 +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 1p1FCD-0001VI-2g for pgsql-general@lists.postgresql.org; Fri, 02 Dec 2022 23:11:59 +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 2B2NBkUN2145871; Fri, 2 Dec 2022 18:11:46 -0500 From: Tom Lane To: Erik Wienhold cc: Jonathan Lemig , pgsql-general@lists.postgresql.org Subject: Re: Views "missing" from information_schema.view_table_usage In-reply-to: <1800921007.42590.1670021241395@office.mailbox.org> References: <2133999369.41448.1670016807570@office.mailbox.org> <1800921007.42590.1670021241395@office.mailbox.org> Comments: In-reply-to Erik Wienhold message dated "Fri, 02 Dec 2022 23:47:21 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2145869.1670022706.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 02 Dec 2022 18:11:46 -0500 Message-ID: <2145870.1670022706@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Erik Wienhold writes: > Could it be a bug? Materialized views are a Postgres extension[1] (I al= ways > thought they are standard.) But I'd expect them to be included when tal= king > about "views". Maybe they are not included because they are considered = being > closer to physical tables[2] than views. Yet their dependencies would j= ustify > inclusion in view_table_usage. The reasoning is that the information_schema views are defined by the SQL standard and therefore should only show content that matches the standard. Thus, they ignore PG-invented objects like matviews and sequences. Some other projects adopt more liberal views about what should be shown in those views, but that one is our policy. regards, tom lane