Received: from tidal.ipinc.com (tidal.ipinc.com [199.245.188.85]) by hub.org (8.10.1/8.10.1) with ESMTP id e8FLWos75559 for ; Fri, 15 Sep 2000 17:32:50 -0400 (EDT) Received: from ipinc.com (jliang.ipinc.com [199.245.188.130]) by tidal.ipinc.com (8.9.3/8.9.3) with ESMTP id OAA49367; Fri, 15 Sep 2000 14:32:25 -0700 (PDT) (envelope-from jliang@ipinc.com) Message-ID: <39C294B6.2EB894AF@ipinc.com> Date: Fri, 15 Sep 2000 14:29:26 -0700 From: Jie Liang Organization: ipinc.com X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 3.4-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Michael Teter CC: pgsql-sql@hub.org Subject: Re: get table schema in psql? References: <20000915084722.12454.qmail@web111.yahoomail.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200009/117 Hi, there, You just need type psql> \d tablename use \? to get help 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/ -- Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 jliang@ipinc.com www.ipinc.com