From: Rommel B. Abaya <rommel.abaya@ramcargroup.com>
To: Michael Teter <michael_teter@yahoo.com>
Cc: pgsql-sql@hub.org
Subject: Re: get table schema in psql?
Date: Fri, 15 Sep 2000 20:29:16 +0800
Message-ID: <39C2161B.E10E9C9E@ramcargroup.com> (raw)
References: <20000915084722.12454.qmail@web111.yahoomail.com>
type \d [tablename] at the psql console
Michael Teter wrote:
> how can I get the schema of a table in psql?
>
> in oracle I would do "desc tablename". I remember sql
> server and ingres having a similar facility.
>
> right now the only way I seem to be able to get the
> information is by using pgaccess.
>
> I realize the definition of the table is probably
> spread across the various pg_ system tables, but I'm
> thinking there must be some easier way to get the
> info.
>
> in particular, I'm after the list of columns, their
> data types and lengths, null/non-null, default values,
> and table indices.
>
> thanks,
> michael
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Mail - Free email you can access from anywhere!
> http://mail.yahoo.com/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: rommel.abaya@ramcargroup.com, michael_teter@yahoo.com, pgsql-sql@hub.org
Subject: Re: get table schema in psql?
In-Reply-To: <39C2161B.E10E9C9E@ramcargroup.com>
References: <20000915084722.12454.qmail@web111.yahoomail.com> <39C2161B.E10E9C9E@ramcargroup.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox