Re: Views "missing" from information_schema.view_table_usage

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Erik Wienhold <ewie(at)ewie(dot)name>
Cc: Jonathan Lemig <jtlemig(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Views "missing" from information_schema.view_table_usage
Date: 2022-12-02 23:11:46
Message-ID: 2145870.1670022706@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-general

Erik Wienhold <ewie(at)ewie(dot)name> 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 views. Yet their dependencies would justify
> 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

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2022-12-03 08:54:32 Explanation of the ROUND function with NUMERIC as an argument
Previous Message Erik Wienhold 2022-12-02 22:47:21 Re: Views "missing" from information_schema.view_table_usage

Browse pgsql-general by date

  From Date Subject
Next Message Zheng Li 2022-12-02 23:48:59 Re: Support logical replication of DDLs
Previous Message Erik Wienhold 2022-12-02 22:47:21 Re: Views "missing" from information_schema.view_table_usage