Re: Get index information from information_schema?

From: Erik Jones <erik(at)myemma(dot)com>
To: Dann Corbit <DCorbit(at)connx(dot)com>
Cc: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>, "AlannY *EXTERN*" <m(at)alanny(dot)ru>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Get index information from information_schema?
Date: 2008-03-18 18:50:49
Message-ID: 296314DD-C468-4DCE-BEC9-36D4FCED7EF2@myemma.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Mar 18, 2008, at 1:28 PM, Dann Corbit wrote:

>> -----Original Message-----
>> From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-
>> owner(at)postgresql(dot)org] On Behalf Of Albe Laurenz
>> Sent: Tuesday, March 18, 2008 1:24 AM
>> To: AlannY *EXTERN*; pgsql-general(at)postgresql(dot)org
>> Subject: Re: [GENERAL] Get index information from information_schema?
>>
>> AlannY wrote:
>>> I need a method of extracting information about indexes of any table
>>> from information_schema.
>>>
>>> Have you any suggestions?
>>
>> I am afraid that indexes are not covered by information_schema.
>>
>> You'd have to dig into pg_catalog.pg_index for this.
>
> Doesn't the PostgreSQL schema have the
> INFORMATION_SCHEMA.KEY_COLUMN_USAGE view?
>
> Or (conversely) are indexes not stored as constraints?

Only if they are PRIMARY KEY or UNIQUE indexes.

Erik Jones

DBA | Emma®
erik(at)myemma(dot)com
800.595.4401 or 615.292.5888
615.292.0777 (fax)

Emma helps organizations everywhere communicate & market in style.
Visit us online at http://www.myemma.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Leon Mergen 2008-03-18 19:06:33 Conditional JOINs ?
Previous Message Rick 2008-03-18 18:41:57 Re: ISO something like "#if 0 ... #endif" for SQL code