Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f8I13Td51077 for ; Mon, 17 Sep 2001 21:03:29 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id f8I0bk678778 for pgsql-sql@postgresql.org; Mon, 17 Sep 2001 20:37:46 -0400 (EDT) (envelope-from news) From: missive@frontiernet.net (Lee Harr) X-Newsgroups: comp.databases.postgresql.sql Subject: Re: How to see the definition of an existing table? Date: Tue, 18 Sep 2001 00:37:46 +0000 (UTC) Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 12 Message-ID: <9o650p$2c1r$1@news.tht.net> References: <5.1.0.14.2.20010914203358.00baabf8@postoffice.mail.cornell.edu> Reply-To: missive@hotmail.com X-Complaints-To: scrappy@hub.org User-Agent: slrn/0.9.7.0 (FreeBSD) To: pgsql-sql@postgresql.org X-Archive-Number: 200109/126 X-Sequence-Number: 4798 On Mon, 17 Sep 2001 14:51:52 +0000 (UTC), ke wang wrote: > Is there any command or query to see the definition of an existing table, > like which is the primary key, which is not null etc. > In psql: \d tablename to see what the exact query is, start psql with the -E flag: psql -E \d tablename