Re: Views "missing" from information_schema.view_table_usage

2022-12-05 Thread Jonathan Lemig
Oh ok. Not to cause confusion, but after I suggested I would request an update to the docs, I thought maybe it would be better to ask if the VTU's code could be modified to include MVs. So I sent a request to pgsql-hackers (I think that's the list to use for feature requests). But from what you'

Re: Views "missing" from information_schema.view_table_usage

2022-12-02 Thread Tom Lane
Erik Wienhold writes: > Could it be a bug? Materialized views are a Postgres extension[1] (I always > thought they are standard.) But I'd expect them to be included when talking > about "views". Maybe they are not included because they are considered being > closer to physical tables[2] than vi

Re: Views "missing" from information_schema.view_table_usage

2022-12-02 Thread Erik Wienhold
> On 02/12/2022 23:22 CET Jonathan Lemig wrote: > > It probably wouldn't hurt to have that added to the documentation. I'll post > a message to pgsql-docs. Thanks again! > > Jon Good idea! Could it be a bug? Materialized views are a Postgres extension[1] (I always thought they are standard.) B

Re: Views "missing" from information_schema.view_table_usage

2022-12-02 Thread Jonathan Lemig
It probably wouldn't hurt to have that added to the documentation. I'll post a message to pgsql-docs. Thanks again! Jon On Fri, Dec 2, 2022 at 4:14 PM Jonathan Lemig wrote: > Hi Erik - sorry I missed your reply when I replied to David's. That is > indeed the issue. The object that the view i

Re: Views "missing" from information_schema.view_table_usage

2022-12-02 Thread Jonathan Lemig
Hi Erik - sorry I missed your reply when I replied to David's. That is indeed the issue. The object that the view is querying is a materialized 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 an

Re: Views "missing" from information_schema.view_table_usage

2022-12-02 Thread Erik Wienhold
> On 02/12/2022 22:55 CET Jonathan Lemig wrote: > > drps=> select viewowner, schemaname, viewname from pg_views where viewname = > 'platform_version_v'; >  viewowner | schemaname | viewname > ---++ >  drps | event | platform_version_v > (1 row) > > drps=> s

Re: Views "missing" from information_schema.view_table_usage

2022-12-02 Thread Erik Wienhold
> On 02/12/2022 22:33 CET 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 resolution? > > Or perhaps there other limitations with the VTU that I'm unaware of? > > Is the one view you cannot find in

Re: Views "missing" from information_schema.view_table_usage

2022-12-02 Thread Jonathan Lemig
Hi David, This is specifically what I'm seeing: drps=> \c psql (12.11, server 12.9) You are now connected to database "drps" as user "drps". drps=> show search_path; search_path "$user", public, event (1 row) drps=> select viewowner, schemaname, viewname from pg_

Re: Views "missing" from information_schema.view_table_usage

2022-12-02 Thread Erik Wienhold
> On 02/12/2022 21:51 CET Jonathan Lemig wrote: > > Has anybody ever encountered this, and if so, did you find a resolution? > Or perhaps there other limitations with the VTU that I'm unaware of? Is the one view you cannot find in view_table_usage a materialized view? Because those are not covere

Re: Views "missing" from information_schema.view_table_usage

2022-12-02 Thread David G. Johnston
On Fri, Dec 2, 2022 at 1:52 PM Jonathan Lemig wrote: > Has anybody ever encountered this, and if so, did you find a resolution? > Or perhaps there other limitations with the VTU that I'm unaware of? > > Well, the query itself is available in the source code if you want to experiment on your own.