title: List all index names, column names and its table name of a PostgreSQL database
body: <p>What is the query to get the list all index names, its column name and its table name of a postgresql database?</p>
  
  <p>I have tried to get the list of all indexes in a db by using this query but how to get the list of indexes, its column names and its table names?</p>
  
  <pre><code> SELECT *
   FROM pg_class, pg_index
   WHERE pg_class.oid = pg_index.indexrelid
   AND pg_class.oid IN (
       SELECT indexrelid
       FROM pg_index, pg_class
       WHERE pg_class.oid=pg_index.indrelid
       AND indisunique != 't'
       AND indisprimary != 't'
       AND relname !~ '^pg_');
  </code></pre>