Re: How do I list the schema for a table or procedure?

From: "W(dot) Scott Gibson" <wsgibson(at)alltel(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How do I list the schema for a table or procedure?
Date: 2004-09-04 21:09:45
Message-ID: xaq_c.23$ax4.0@fe61.usenetserver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Google Mike wrote:
> How do I list the schema for a table or procedure? Is there a command
> I can do in psql to list this, or do I have to join a series of tables
> to see that?

You can do a "pg_dump -s <DBNAME>" to see the full schema of the
database. To see just a table of the database issue the command
"pg_dump -st <TABLENAME> <DBNAME>". These are run from the command line
and not within the psql shell.

Within psql you could use "\d <TABLENAME>" to describe a specific table.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Randy Yates 2004-09-04 21:18:56 building postgres for windows 2000?
Previous Message Google Mike 2004-09-04 20:53:48 HOWTO: Get a table or database definition