Received: from localhost (uranus.hub.org [200.46.204.60]) by postgresql.org (Postfix) with ESMTP id 28D819FA4CF for ; Tue, 7 Nov 2006 16:45:26 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.60]) (amavisd-new, port 10024) with ESMTP id 65330-07 for ; Tue, 7 Nov 2006 16:45:22 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id 94E919FA14D for ; Tue, 7 Nov 2006 16:45:22 -0400 (AST) Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Tue, 7 Nov 2006 20:45:20 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 07 Nov 2006 14:45:19 -0600 Subject: Re: Question From: Scott Marlowe To: Richard Broersma Jr Cc: Mark Steben , pgsql-admin@postgresql.org In-Reply-To: <529237.52273.qm@web31802.mail.mud.yahoo.com> References: <529237.52273.qm@web31802.mail.mud.yahoo.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1162932319.13696.32.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Tue, 07 Nov 2006 14:45:19 -0600 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/56 X-Sequence-Number: 23583 On Tue, 2006-11-07 at 14:27, Richard Broersma Jr wrote: > > I am very new to PostgreSQL. Is it appropriate to pose questions to this > > email list? > > I am trying to come up with a query that will list the names of the database > > indexes that > > > > Have been chosen as clustering indexes. I know I can get the INDEXRELID > > from PG.INDEX > > > > But have yet to figure out how to get the index name from there. Any help > > would be appreciated. > > > > And, if this is not an appropriate forum to ask questions please tell me. > > I assume this is an appropiate list for this question. I am sure that pg_general would have > worked also. With-out knowing the postgresql pg_* schema very well I can be difficult to > determine queries that will give your this sort of information. In my case I like to cheat. > > 1) I turn on statement logging. > 2) I issue a commands like \d from psql interface > 3) Then, I look at the pg_logs to see what sql statement was actually created from "\d" Easier way to cheat: psql -E dbname then all the \d commands and what not will spill their secrets right on the screen. :)