pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Steben <msteben@autorevenue.com>
To: jeff@frostconsultingllc.com
Cc: pgsql-admin@postgresql.org
Subject: Re: Question
Date: Tue, 7 Nov 2006 15:50:25 -0500
Message-ID: <001001c702ae$5989da00$b501a8c0@D1RPQZB1> (raw)
In-Reply-To: <Pine.LNX.4.64.0611071226550.23695@discord.home.frostconsultingllc.com>

Thank you, Jeff.  That worked like a champ.  My initial problem
Had to do with not understanding the concept of OID datatypes.
My next learning task is to read up on OID.

Thanks again, Mark

-----Original Message-----
From: jeff@frostconsultingllc.com [mailto:jeff@frostconsultingllc.com] 
Sent: Tuesday, November 07, 2006 3:29 PM
To: Mark Steben
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Question

On Tue, 7 Nov 2006, Mark Steben wrote:

> I am very new to PostgreSQL.  Is it appropriate to pose questions to this
> email list?

It might be better on pgsql-sql, but I'm not sure.

> 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.

You want to join on pg_class.oid.  You can see the info on pg_index here in 
the docs: http://www.postgresql.org/docs/8.1/static/catalog-pg-index.html

select i.indexrelid,c.relname from pg_index i, pg_class c where i.indexrelid
= 
c.oid;

will likely give you what you're after.

-- 
Jeff Frost, Owner 	<jeff@frostconsultingllc.com>
Frost Consulting, LLC 	http://www.frostconsultingllc.com/
Phone: 650-780-7908	FAX: 650-649-1954




view thread (32+ messages)  latest in thread

Message-ID: <001001c702ae$5989da00$b501a8c0@D1RPQZB1>
Permalink:  ../001001c702ae$5989da00$b501a8c0@D1RPQZB1/
Also on:    postgresql.org/message-id/001001c702ae$5989da00$b501a8c0@D1RPQZB1

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: msteben@autorevenue.com, jeff@frostconsultingllc.com
  Subject: Re: Question
  In-Reply-To: <001001c702ae$5989da00$b501a8c0@D1RPQZB1>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox