Re: how to find index columns
От | Eric B. Ridge |
---|---|
Тема | Re: how to find index columns |
Дата | |
Msg-id | 4DDC27D0-14ED-479F-84E8-32E8BB44D238@tcdi.com обсуждение исходный текст |
Ответ на | Re: how to find index columns (Andrew - Supernews <andrew+nonews@supernews.com>) |
Список | 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
В списке pgsql-hackers по дате отправления: