Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 04DAE61AFC0 for ; Fri, 20 Jan 2012 17:35:07 -0400 (AST) Received: from gwmta.wicourts.gov ([165.219.244.99] helo=gw.wicourts.gov) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RoM6x-0005KP-EU for pgsql-admin@postgresql.org; Fri, 20 Jan 2012 21:35:06 +0000 Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Fri, 20 Jan 2012 15:34:49 -0600 Message-Id: <4F1989960200002500044A5F@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Fri, 20 Jan 2012 15:34:46 -0600 From: "Kevin Grittner" To: ,"jkells" Subject: Re: Meta data information on tables References: <02kSq.257143$1x3.130247@en-nntp-16.dc1.easynews.com> In-Reply-To: <02kSq.257143$1x3.130247@en-nntp-16.dc1.easynews.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201201/120 X-Sequence-Number: 39032 jkells wrote: > I am running PostgreSQL 8.4.7 (64 bit) on a Ubuntu 10.10 64 bit > system. I am trying to generate a report listing all our tables, > their column attributes (type, constraints etc.) and comments (if > any) for each of them. I'm having a hard time finding this in the > catalog areas. I can find some of this information but cant seem > to tie them all together. Can anyone help with advise or queries? > Thanks Try running psql with the -E option, and run \d on a few tables. psql will show all the queries used to generate its reports, which should arm you with enough information to write what you want. -Kevin