From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | jeffcoat(at)alumni(dot)rice(dot)edu |
Cc: | "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Showing table comments with psql |
Date: | 2019-01-04 17:00:08 |
Message-ID: | CAFj8pRDPpWi1EAdyYx+AadKey-zs+hidnsyfdvU627vZAm3Xkw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi
pá 4. 1. 2019 v 17:57 odesílatel Mark Jeffcoat <mark(dot)e(dot)jeffcoat(at)gmail(dot)com>
napsal:
> I'm creating table and view comments with "COMMENT ON", and I can find
> the comment in pg_description, but I can't find a way to show the
> table comments using psql.
>
> $ psql --version
> psql (PostgreSQL) 11.1 (Debian 11.1-1+b2)
>
> I'd expect to see table comments by using \d+, and found an old post
> on this list where \dd worked; neither work for me today. Am I looking
> in the right place? Is this a regression?
>
postgres=# create table test_table (col1 integer);
CREATE TABLE
postgres=# comment on table test_table is 'this is a table comment';
COMMENT
postgres=# \dt+
List of relations
┌────────┬────────────┬───────┬───────┬─────────┬─────────────────────────┐
│ Schema │ Name │ Type │ Owner │ Size │ Description │
╞════════╪════════════╪═══════╪═══════╪═════════╪═════════════════════════╡
│ public │ test_table │ table │ pavel │ 0 bytes │ this is a table comment │
└────────┴────────────┴───────┴───────┴─────────┴─────────────────────────┘
(1 row)
postgres=#
From | Date | Subject | |
---|---|---|---|
Next Message | Igor Korot | 2019-01-04 17:12:23 | Re: Comparing dates in DDL |
Previous Message | Rich Shepard | 2019-01-04 16:53:19 | Comparing dates in DDL |