pg.ddx.io pgsql-general@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Susan Hurst <susan.hurst@brookhurstdata.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Displaying Comments in Views
Date: Mon, 28 Jan 2019 09:49:52 -0600
Message-ID: <8c21bf3727cd98b3e80f1253b78e3ce2@mail.brookhurstdata.net> (raw)
In-Reply-To: <8183.1548689278@sss.pgh.pa.us>
References: <8d48b89ca871afcce64a6b78d2db2b0c@mail.brookhurstdata.net>
<8183.1548689278@sss.pgh.pa.us>
Thx for the great info. I appreciate your pointing me in the right
direction.
Sue
---
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Susan E Hurst
Principal Consultant
Brookhurst Data LLC
Email: susan.hurst@brookhurstdata.com
Mobile: 314-486-3261
On 2019-01-28 09:27, Tom Lane wrote:
> Susan Hurst <susan.hurst@brookhurstdata.com> writes:
>> What is the trick for displaying column comments in views?
>> The query below works as expected when the table_schema includes
>> tables,
>> however it shows nothing when the table_schema contains only views.
>
> No surprise, since you're using pg_statio_all_tables as the source of
> tables, and that contains, well, only tables.
>
> I'm not quite sure why you'd choose that view anyway. Personally I'd
> have gone directly to pg_class, and then probably filtered on relkind
> if there were things I didn't want to see. Or you could use
> information_schema.tables.
>
> Also, I'm too lazy to check on how information_schema.columns defines
> "ordinal_position", but I wonder if it tries to leave out dropped
> columns, or might do so in future. That puts this join condition
> at risk: "pd.objsubid = c.ordinal_position".
>
> You'd likely be better off to join pg_class and pg_attribute to
> pg_description, rather than working with proxies for them.
>
> https://www.postgresql.org/docs/current/catalogs.html
>
> regards, tom lane
view thread (5+ messages)
Message-ID: <8c21bf3727cd98b3e80f1253b78e3ce2@mail.brookhurstdata.net> Permalink: ../8c21bf3727cd98b3e80f1253b78e3ce2@mail.brookhurstdata.net/ Also on: postgresql.org/message-id/8c21bf3727cd98b3e80f1253b78e3ce2@mail.brookhurstdata.net ·
reply
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 from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-general@postgresql.org Cc: susan.hurst@brookhurstdata.com Subject: Re: Displaying Comments in Views In-Reply-To: <8c21bf3727cd98b3e80f1253b78e3ce2@mail.brookhurstdata.net> References: <8d48b89ca871afcce64a6b78d2db2b0c@mail.brookhurstdata.net> <8183.1548689278@sss.pgh.pa.us> <8c21bf3727cd98b3e80f1253b78e3ce2@mail.brookhurstdata.net> * 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