From: | "Eric B(dot) Ridge" <ebr(at)tcdi(dot)com> |
---|---|
To: | andrew(at)supernews(dot)com |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: how to find index columns |
Date: | 2006-12-06 15:05:36 |
Message-ID: | 4DDC27D0-14ED-479F-84E8-32E8BB44D238@tcdi.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Dec 5, 2006, at 11:17 PM, Andrew - Supernews wrote:
> Way ahead of you: http://pgfoundry.org/projects/newsysviews/ (see the
> source code repo, there are no releases)
Neat. I looked at this:
http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/newsysviews/newsysview/
sql/indexes.sql?rev=1.2
Seems both views are missing the indexed column name(s). I ran into
a situation where I needed to present a list of all indexed columns
on a table, hence my "information_schema.indexes" view. It attempts
to parse the columns from the index definition. It just can't parse
definitions that use functional indexes.
Maybe you can consider adding a similar column to these views?
Output the column names as a name[] and maybe add another column for
"functional_definition"? Maybe Postgres could maintain that
information in the system catalogs, but I suppose there's a good
reason it doesn't already do that.
Just a thought.
eric
>
> (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
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
>
> http://www.postgresql.org/about/donate
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2006-12-06 15:07:21 | Re: postgresql error messages |
Previous Message | Markus Schiltknecht | 2006-12-06 15:05:00 | Re: Lock for table renaming |