Re: Create view that retrieves both table and column comments - Mailing list pgsql-novice

From Joe Conway
Subject Re: Create view that retrieves both table and column comments
Date
Msg-id 56C63603.1070905@joeconway.com
Whole thread Raw
In response to Re: Create view that retrieves both table and column comments  (Killian Driscoll <killian.driscoll@ucd.ie>)
Responses Re: Create view that retrieves both table and column comments  (Killian Driscoll <killian.driscoll@ucd.ie>)
List pgsql-novice
On 02/18/2016 01:15 PM, Killian Driscoll wrote:
> On 18 February 2016 at 22:01, Joe Conway wrote:
>     WHERE NOT n.nspname LIKE 'pg\_%'
>     AND NOT n.nspname = 'information_schema'
>     AND a.attnum > 0
>     AND c.relkind = 'r'
>     UNION ALL

> This works - thank you. I see in column "a.attname as column_name",
> there are a few rows with data like '......pg.dropped.3.....': what are
> these?

Those are columns that have been dropped after the table was created.
You could filter those out by adding

  AND NOT a.attisdropped

into the WHERE clause before the UNION ALL

Joe

--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development


Attachment

pgsql-novice by date:

Previous
From: Killian Driscoll
Date:
Subject: Re: Create view that retrieves both table and column comments
Next
From: Killian Driscoll
Date:
Subject: Re: Create view that retrieves both table and column comments