Re: [GENERAL] How to know the indexes on a Table

Поиск
Список
Период
Сортировка
Искать

Re: [GENERAL] How to know the indexes on a Table

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Anirban Pal"  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
FAQ