OK. If you want to see the indexes to a table in Postgresql you can do this here:
\d <TABLENMAE>
If that is not showing what you expected you can do this short sql statement.
select t.relname as table_name, i.relname as index_name, a.attname as column_name from pg_class t, pg_class i, pg_index ix, pg_attribute a where t.oid = ix.indrelid and i.oid = ix.indexrelid and a.attrelid = t.oid and a.attnum = ANY(ix.indkey) and t.relkind = 'r' and t.relname like 'not%' order by t.relname, i.relname;
That shows all indexes which are beginning with “not”.
I heard from other database where you just have to type in “show indexes”. But why make it so easy if it can be so difficult.
The usability of postgresql is incredible bad!
Or just…
select * from pg_indexes where tablename = ‘your_table’;
select * from pg_indexes where tablename = ‘your_table’; > thx
http://dba.stackexchange.com/questions/116797/is-there-a-way-to-show-the-creation-statement-for-an-index-in-postgresql
TL;DR:
SELECT indexdef FROM pg_indexes WHERE indexname = ‘your_index’;