Query that produces index information for a Table - Mailing list pgsql-general

From Boyd, Craig
Subject Query that produces index information for a Table
Date
Msg-id 4BE5F9CB.7080802@mysoftforge.com
Whole thread Raw
Responses Re: Query that produces index information for a Table  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hello All,

I am trying to pull together some general information about indices
(indexes?) for a particular table.
I need the following: Index Name, Table Name, Column Name,
Unique/Non-Unique, and ordinal position in the index.
The information_schema.key_column_usage gets me most of the way there, I
think, but does not tell me whether the index is unique and does not
seem to differentiate between indices and other types of constraints.
I can't believe I am the first to ask this question so I am hoping
someone can send me what they use to get this information.

Thanks,

Craigbert

--
I am using the free version of SPAMfighter.
We are a community of 7 million users fighting spam.
SPAMfighter has removed 1387 of my spam emails to date.
Get the free SPAMfighter here: http://www.spamfighter.com/len

The Professional version does not have this message



pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Documentation availability as a single page of text
Next
From: Tom Lane
Date:
Subject: Re: Query that produces index information for a Table