Received: from web120.yahoomail.com (web120.yahoomail.com [205.180.60.121]) by hub.org (8.10.1/8.10.1) with SMTP id e8F9nes48894 for ; Fri, 15 Sep 2000 05:49:40 -0400 (EDT) Received: (qmail 19690 invoked by uid 60001); 15 Sep 2000 09:49:39 -0000 Message-ID: <20000915094939.19689.qmail@web120.yahoomail.com> Received: from [207.239.163.250] by web120.yahoomail.com; Fri, 15 Sep 2000 02:49:39 PDT Date: Fri, 15 Sep 2000 02:49:39 -0700 (PDT) From: Michael Teter Subject: Re: get table schema in psql? To: Patrik Kudo Cc: pgsql-sql@hub.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200009/112 doh! thanks so much. somehow I thought \h and \? were the same, and I've only been doing \h :) no wonder I couldn't find it. michael --- Patrik Kudo wrote: > Hi! > > I think what you're looking for is > > \d > > and > > \d name_of_table > > You might also want to try > > \? > > for a list of all psql commands > > Regards, > Patrik Kudo > > ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo > un\2\1 is xg'`ol > Känns det oklart? Fråga på! > > On Fri, 15 Sep 2000, 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/ > > > __________________________________________________ Do You Yahoo!? Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/