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 1p1Eoq-0008HD-Nj for pgsql-general@arkaria.postgresql.org; Fri, 02 Dec 2022 22:47: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 1p1Eoo-0002ni-C4 for pgsql-general@arkaria.postgresql.org; Fri, 02 Dec 2022 22:47:42 +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 1p1Eoo-0002nY-0C for pgsql-general@lists.postgresql.org; Fri, 02 Dec 2022 22:47:42 +0000 Received: from mout-u-204.mailbox.org ([2001:67c:2050:101:465::204]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p1Eoh-0004FJ-2d for pgsql-general@lists.postgresql.org; Fri, 02 Dec 2022 22:47:40 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4NP7PB3fGPz9sQQ; Fri, 2 Dec 2022 23:47:26 +0100 (CET) Date: Fri, 2 Dec 2022 23:47:21 +0100 (CET) From: Erik Wienhold To: Jonathan Lemig Cc: pgsql-general@lists.postgresql.org Message-ID: <1800921007.42590.1670021241395@office.mailbox.org> In-Reply-To: References: <2133999369.41448.1670016807570@office.mailbox.org> Subject: Re: Views "missing" from information_schema.view_table_usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Priority: 3 Importance: Normal List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 02/12/2022 23:22 CET Jonathan Lemig wrote: > > It probably wouldn't hurt to have that added to the documentation. I'll= =C2=A0post > a message to pgsql-docs. Thanks again! > > Jon Good idea! Could it be a bug? Materialized views are a Postgres extension[1] (I alway= s thought they are standard.) But I'd expect them to be included when talkin= g about "views". Maybe they are not included because they are considered bei= ng closer to physical tables[2] than views. Yet their dependencies would just= ify inclusion in view_table_usage. [1] https://www.postgresql.org/docs/15/sql-creatematerializedview.html, see= Compatibility [2] https://www.postgresql.org/docs/9.3/release-9-3.html#AEN119452 > On Fri, Dec 2, 2022 at 4:14 PM Jonathan Lemig wrote: > > Hi Erik - sorry I missed your=C2=A0reply when I replied to David's. Tha= t is > > indeed the issue. The object that the view is querying is a materialize= d > > view. > > > > Thanks for the link. > > > > Jon > > > > > > On Fri, Dec 2, 2022 at 3:33 PM Erik Wienhold wrote: > > > > On 02/12/2022 21:51 CET Jonathan Lemig wrote: > > > > > > > > Has anybody ever encountered this, and if so, did you find a resol= ution? > > > > Or perhaps there other limitations with the VTU that I'm unaware o= f? > > > > > > Is the one view you cannot find in view_table_usage a materialized v= iew? > > > Because those are not covered by view_table_usage[1]. > > > > > > [1] https://git.postgresql.org/gitweb/?p=3Dpostgresql.git;a=3Dblob;f= =3Dsrc/backend/catalog/information_schema.sql;h=3D18725a02d1fb6ffda3d218033= b972a0ff23aac3b;hb=3DHEAD#l2605 > > > > > > -- > > > Erik -- Erik