title: Get constraints and indexes on materialized views
body: <p>Query to get all indexes and all constraints on all materialized views in Postgres. The below query only returns indexes on tables.</p>
  
  <pre><code>SELECT indexname, indexdef 
  FROM pg_indexes 
  WHERE schemaname = 'public' AND tablename = 'table'
  </code></pre>