Re: How to know the indexes on a Table

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to know the indexes on a Table
Дата
Msg-id 4562.1244215079@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How to know the indexes on a Table  ("Anirban Pal" <anirban.pal@newgen.co.in>)
Список pgsql-general
"Anirban Pal" <anirban.pal@newgen.co.in> writes:
> Is there any way, to know the name of indexes on a table, defined in a database. I mean can I query something like
> Select Index_name from pg_class where relname = "Table_name" . Thanks in advance.

You need to join through pg_index, specifically its columns indrelid and
indexrelid.  Try running psql with the -E option and look at the queries
it uses to implement "\d Table_name".

            regards, tom lane

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