Re: how to find index columns - Mailing list pgsql-hackers

From Andrew - Supernews
Subject Re: how to find index columns
Date
Msg-id slrnench27.is.andrew+nonews@atlantis.supernews.net
Whole thread Raw
In response to Re: how to find index columns  (Andrew - Supernews <andrew+nonews@supernews.com>)
Responses Re: how to find index columns  ("Eric B. Ridge" <ebr@tcdi.com>)
List pgsql-hackers
On 2006-12-06, "Eric B. Ridge" <ebr@tcdi.com> wrote:
> On Dec 5, 2006, at 8:43 PM, Andrew - Supernews wrote:
>> On 2006-12-06, Timasmith <timasmith@hotmail.com> wrote:
>>> While pg_catalog.pg_index has the create index script I otherwise  
>>> cant
>>> find the index columns in the information_schema.
>>
>> That's because there are no index columns in the information_schema.
>
> I'm just a lonely lurker here and I never saw Timasmith's original  
> post -- only your response.  Despite this sounding more like a - 
> general topic, here's the view I use:
[...]
> Sadly, I create it in the "information_schema".  It probably doesn't  
> handle functional or partial indexes nicely and it is only known to  
> work with PG v8.1.x.  Maybe this will inspire someone to expand upon it.

Way ahead of you: http://pgfoundry.org/projects/newsysviews/ (see the
source code repo, there are no releases)

(though that was written for 7.4 and 8.0, and needs some fixing for 8.1
still (though almost all of it works), and I haven't even tried it on 8.2
yet)

-- 
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: psql possible TODO
Next
From: Andrew - Supernews
Date:
Subject: Re: how to find index columns