title: How to query the metadata of indexes in PostgreSQL
body: <p>I need to be able to query a PostgreSQL database to obtain information about the indexes present and their details.</p>
  
  <p>On SQL Server, I can do the following to get a list of all tables/indexes/columns for all indexes:</p>
  
  <pre><code>select TABLE_NAME, INDEX_NAME, NON_UNIQUE, COLUMN_NAME
  from INFORMATION_SCHEMA.STATISTICS
  where TABLE_SCHEMA = 'my_schema'
  order by TABLE_NAME, INDEX_NAME, SEQ_IN_INDEX
  </code></pre>
  
  <p>It seems that the STATISTICS table of INFORMATION_SCHEMA is a SQL Server extension. How can I do the equivalent in PostgreSQL?</p>
  
  <p><strong>EDIT: I'm specifically trying to return a denormalized result set as follows</strong></p>
  
  <pre><code>TableName, IndexName, UniqueFl, ColumnName
  </code></pre>
  
  <p>So I get a row back for each column in all indexes.</p>
  
  <p>Thanks,
  Jon</p>