Return-Path: aoki
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA25241; Thu, 25 Mar 93 00:48:01 -0800
Message-Id: <9303250848.AA25241@postgres.Berkeley.EDU>
From: aoki@postgres.berkeley.edu (Paul M. Aoki)
Subject: Re: Indices
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
In-Reply-To: Your message of Thu, 25 Mar 93 00:26:11 -0800 
	     <9303250826.AA25148@postgres.Berkeley.EDU> 
Date: Thu, 25 Mar 1993 00:48:24 -0800
Sender: aoki@postgres.Berkeley.EDU

wolf@molout.tutkie.tut.ac.jp (Wolf-D. Ihlenfeldt) writes:
> 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 ?

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  |  aoki@postgres.Berkeley.EDU
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki
