From: Erik Wienhold <ewie@ewie.name>
To: Jonathan Lemig <jtlemig@gmail.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Views "missing" from information_schema.view_table_usage
Date: Fri, 2 Dec 2022 23:14:05 +0100 (CET)
Message-ID: <1540400959.42131.1670019245837@office.mailbox.org> (raw)
In-Reply-To: <CABR8q_-7hBs8O=JBeTXN20+g9Q3M4WNv80csa9Ah3HMpB2_0gA@mail.gmail.com>
References: <CABR8q__QVKFzaUdQQsyU2wd2TZX1tdv7Q8M5myQ8L=BDDAtjLQ@mail.gmail.com>
<CAKFQuwb3xQ5UbyFqW3TFDKBenBrngUXrA4152-3yT8Aeb1eSYQ@mail.gmail.com>
<CABR8q_-7hBs8O=JBeTXN20+g9Q3M4WNv80csa9Ah3HMpB2_0gA@mail.gmail.com>
> On 02/12/2022 22:55 CET Jonathan Lemig <jtlemig@gmail.com> 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=> select * from information_schema.view_table_usage where view_name = 'platform_version_v';
> view_catalog | view_schema | view_name | table_catalog | table_schema | table_name
> --------------+-------------+-----------+---------------+--------------+------------
> (0 rows)
>
> The event.platform_version_v doesn't show up when querying the view_table_usage view.
Does platform_version_v reference any tables? That view name suggests that it
provides some version info, e.g. with a definition like:
create view event.platform_version_v as select '1.0.0' as version;
In that case it won't appear in view_table_usage.
--
Erik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: ewie@ewie.name, jtlemig@gmail.com, david.g.johnston@gmail.com, pgsql-general@lists.postgresql.org
Subject: Re: Views "missing" from information_schema.view_table_usage
In-Reply-To: <1540400959.42131.1670019245837@office.mailbox.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox