Skip to content

Instantly share code, notes, and snippets.

@maciejwalkowiak
Created November 8, 2019 10:41
Show Gist options
  • Save maciejwalkowiak/e71788f2811d6eaccd79078b2fe68ece to your computer and use it in GitHub Desktop.
Save maciejwalkowiak/e71788f2811d6eaccd79078b2fe68ece to your computer and use it in GitHub Desktop.
PostgreSQL: How to list all indexes?
SELECT
tablename,
indexname,
indexdef
FROM
pg_indexes
WHERE
schemaname = 'public'
ORDER BY
tablename,
indexname;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment