Answers for "psql show indexes"

SQL
0

list all indexes postgres

select * from pg_indexes
where schemaname like '<schema-name>' and tablename like '<table-name>'
Posted by: Guest on October-25-2021
1

how to show index type in postgresql

SELECT tab.relname, cls.relname, am.amname
FROM pg_index idx 
JOIN pg_class cls ON cls.oid=idx.indexrelid
JOIN pg_class tab ON tab.oid=idx.indrelid
JOIN pg_am am ON am.oid=cls.relam;
Posted by: Guest on April-28-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language