getting index columns from information_schema?

Lists: pgsql-generalpgsql-hackers
From: "Timasmith" <timasmith(at)hotmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: getting index columns from information_schema?
Date: 2006-12-04 15:18:44
Message-ID: 1165245524.716201.68590@80g2000cwy.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers

I cant seem to find the right query to retreive the discrete columns,
column position, for a specified index.

This is towards the purpose of identifying the schema differences
between two databases and creating the changes needed.


From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Timasmith <timasmith(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [HACKERS] getting index columns from information_schema?
Date: 2006-12-04 17:33:02
Message-ID: 1165253582.25371.25.camel@dogma.v10.wvs
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers

On Mon, 2006-12-04 at 07:18 -0800, Timasmith wrote:
> I cant seem to find the right query to retreive the discrete columns,
> column position, for a specified index.
>
> This is towards the purpose of identifying the schema differences
> between two databases and creating the changes needed.
>

Note: this question is appropriate on pgsql-general, not on pgsql-
hackers.

The columns of an index can be found in pg_attribute with an indexrelid
equal to the oid of the index's entry in pg_class.

Regards,
Jeff Davis