Re: How do I list all tables?

From: "Keith C(dot) Perry" <keith(at)vcsn(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How do I list all tables?
Date: 2001-02-01 07:23:08
Message-ID: 3A790EDC.8D9B7D22@vcsn.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I think I might have described this wrong- "\dt" works the same in
version 6 and 7. However "\d *" shows you the detail of **each** table
in the database. So if you two tables called "status" and "tasks", the
output of "\d *" would be:

Table = status
+----------------------------------+----------------------------------+-------+
| Field | Type |
Length|
+----------------------------------+----------------------------------+-------+
| statid | int4
| 4 |
| flag | varchar()
| 80 |
| color | char()
| 6 |
+----------------------------------+----------------------------------+-------+

Table = tasks
+----------------------------------+----------------------------------+-------+
| Field | Type |
Length|
+----------------------------------+----------------------------------+-------+
| taskid | int4
| 4 |
| jid | int4
| 4 |
| conid | int4
| 4 |
| workdone | varchar()
| 800 |
| date | char()
| 10 |
+----------------------------------+----------------------------------+-------+

if these were the only tables in the database. Since version 7 of pgSQL
doesn't seem to support this, I would like to know what is the
alternative way to list all of the tables AND their field descriptions?
Thanks

cwz wrote:

> use \dt
>
> Note:
> \d{t|i|s|v} list tables/indices/sequences/views
> \d{p|S|l} list permissions/system tables/lobjects
> \da list aggregates
> \dd [object] list comment for table, type, function, or operator
> \df list functions
> \do list operators
> \dT list data types
>
> Curt

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adam Haberlach 2001-02-01 07:48:08 Re: trying to back up a database
Previous Message Adam Haberlach 2001-02-01 07:18:15 Re: php as stored procedures