Subject: Indices

From: [email-masked] (Wolf-D. Ihlenfeldt)
Date: Thu, 25 Mar 93 00:26:11 -0800

I know how to find out which indices exist on a given class
and the class an index is for.

But is there a way to be more detailed, i.e. how do I get
the attribute(s in future releases?) an index uses or the name of an
index for a class/attribute pair ? The pg_index class does not seem
to contain an obvious oid of the attribute, or am I overlooking
something ?

Thank you for your help.

WDI

---

From: [email-masked] (Paul M. Aoki)
Date: Thu, 25 Mar 1993 00:48:24 -0800

> to contain an obvious oid of the attribute, or am I overlooking

this lists the indexed class name, the index name, and the attributes
of the indexed class:

retrieve (c.relname, i.relname, pg_index.indkey) 
	from c in pg_class, i in pg_class 
	where c.oid  = pg_index.indrelid 
	and i.oid = pg_index.indexrelid

they are just attribute numbers, not oids, which is probably why 
you overlooked it...
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki