Re: Question

From: adey <adey11(at)gmail(dot)com>
To: "Mark Steben" <msteben(at)autorevenue(dot)com>
Cc: jeff(at)frostconsultingllc(dot)com, pgsql-admin(at)postgresql(dot)org
Subject: Re: Question
Date: 2006-11-08 00:55:24
Message-ID: 1c66bda80611071655p45c02786ya8a7ea38a6590a84@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I think the following query should list clustered indexes for you:-

select * from pg_index
where indisclustered = 't'

On 11/8/06, Mark Steben <msteben(at)autorevenue(dot)com> wrote:
>
> 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(at)frostconsultingllc(dot)com [mailto:jeff(at)frostconsultingllc(dot)com]
> Sent: Tuesday, November 07, 2006 3:29 PM
> To: Mark Steben
> Cc: pgsql-admin(at)postgresql(dot)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(at)frostconsultingllc(dot)com>
> Frost Consulting, LLC http://www.frostconsultingllc.com/
> Phone: 650-780-7908 FAX: 650-649-1954
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Michael McCloskey 2006-11-08 01:34:21 Postgres at startup
Previous Message Joseph M. Day 2006-11-08 00:19:25 unsubscribe