From: | Mike Mascari <mascarm(at)mascari(dot)com> |
---|---|
To: | Fritz Lehmann-Grube <lehmannf(at)math(dot)TU-Berlin(dot)DE> |
Cc: | PostgreSQL general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: ORDER BY in \dt+ ? |
Date: | 2002-02-01 13:27:39 |
Message-ID: | 3C5A97CB.888005B1@mascari.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Fritz Lehmann-Grube wrote:
>
> Hallo All,
>
> I'd like to have the output of a \dt+ command ordered.
> Is there a ( badly documented ) option like \pset listingorder=... ?
> Or do I have to rewrite it like
> SELECT * FROM pg_tables WHERE ... ORDER BY oid;
I am unaware of any ORDER BY options. You can view the query that psql
is generating by using the -E option on the command line.
>
> If so, how do I get the comments ? As far as I can see, they are not
> stored in pg_tables - where else ?
They are stored in pg_description. In pre-7.2, the objoid in
pg_description relates to the oid of the object for which the comment
was created.
>
> Another question is about comments on columns. I can create one, but
> cannot get it afterwards. I did:
>
> arbeitsdb04=# comment on column sections.final is 'Hallo final';
> COMMENT
> arbeitsdb04=# \dd sections.final
> Object descriptions
> Name | Object | Description
> ------+--------+-------------
> (0 rows)
>
> So where is that comment ?
This appears to be a bug in psql. You can view the query using -E above
to see what it is doing. It generates a UNION of:
aggregates
relations
triggers
procedures
rules
types
but no
attributes
which is what a column comment is. You can, of course, see the comment
on the column by using:
\d+ sections.
Hope that helps,
Mike Mascari
mascarm(at)mascari(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Johnson, Shaunn | 2002-02-01 13:53:40 | date functions |
Previous Message | Picrate | 2002-02-01 13:24:41 | trigger-procedure without plpgsql |