Created
August 16, 2019 09:13
-
-
Save ketanbhatt/fdbd6246b4b1b7bb32009de5e468ed57 to your computer and use it in GitHub Desktop.
Get a list of the indexes and their definitions for a given table, in Postgres
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT tablename, | |
indexname, | |
indexdef | |
FROM pg_indexes | |
WHERE tablename = '$$table_name$$' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment