Re: Getting info on index

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Getting info on index
Дата
Msg-id 3559.1005110121@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Getting info on index  (Francisco Reyes <lists@natserv.com>)
Ответы Re: Getting info on index  (Francisco Reyes <lists@natserv.com>)
Список pgsql-novice
Francisco Reyes <lists@natserv.com> writes:
> What, if anything, would show me the complete key of an index?

You could use pg_get_indexdef, which is what pg_dump uses:

regression=# select pg_get_indexdef((select oid from pg_class where relname = 'fooi'));
                 pg_get_indexdef
--------------------------------------------------
 CREATE INDEX fooi ON foo USING btree (lower(f1))
(1 row)

There's been some talk of improving psql's \d facility to make use of
this itself, but it's probably too late to do it for 7.2 ...

            regards, tom lane

В списке pgsql-novice по дате отправления:

Предыдущее
От: Francisco Reyes
Дата:
Сообщение: Getting info on index
Следующее
От: Seth Milder
Дата:
Сообщение: Rules