Re: How to retrieve functional index column names - Mailing list pgsql-hackers

From Tom Lane
Subject Re: How to retrieve functional index column names
Date
Msg-id 21010.1073627783@sss.pgh.pa.us
Whole thread Raw
In response to How to retrieve functional index column names  (glogy@centrum.cz (Jakub))
List pgsql-hackers
glogy@centrum.cz (Jakub) writes:
> I need to retrieve the name of the function and the index column names
> of the functional index. The system information about the
> index(function and its args) is stored in the system catalog column
> pg_index.indexprs.

As of 7.4, this is a requirement badly in need of reconsideration.
What makes you think there is any function name involved?  Consider
something likecreate index i on t ((col + 2));

Getting the column names is still a sensible operation though.  I'd
suggest looking in pg_depend to see which columns of the table the
index depends on.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Restrict users from describing table
Next
From: Thomas Swan
Date:
Subject: Re: psql \d option list overloaded