Skip to content

Instantly share code, notes, and snippets.

@ethagnawl
Created January 27, 2020 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ethagnawl/027c030167555f171567974783fe6f71 to your computer and use it in GitHub Desktop.
Save ethagnawl/027c030167555f171567974783fe6f71 to your computer and use it in GitHub Desktop.
list PG indexes
# https://www.postgresqltutorial.com/postgresql-indexes/postgresql-list-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