Received: from mail.ramcargroup.com (mail.ramcargroup.com [202.58.114.60]) by hub.org (8.10.1/8.10.1) with ESMTP id e8FCNUs08621 for ; Fri, 15 Sep 2000 08:23:31 -0400 (EDT) Received: from mmj.ramcargroup.com (ip-10.16.16.16.ramcargroup.com [10.16.16.16]) by mail.ramcargroup.com (Postfix) with ESMTP id 95CACF2F43; Fri, 15 Sep 2000 20:23:27 +0800 (PHT) Received: from ramcargroup.com (unknown [133.88.30.131]) by mmj.ramcargroup.com (Postfix) with ESMTP id DE7F6F2042; Fri, 15 Sep 2000 20:56:57 +0800 (PHT) Message-ID: <39C2161B.E10E9C9E@ramcargroup.com> Date: Fri, 15 Sep 2000 20:29:16 +0800 From: "Rommel B. Abaya" X-Mailer: Mozilla 4.73 [en] (Win98; U) 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/113 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/