Created
May 16, 2024 11:15
-
-
Save Charmatzis/e5781bdaa3a18a7ecad3aec22fd216e3 to your computer and use it in GitHub Desktop.
Get all indexes DDL for Postgres
This file contains hidden or 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 pg_get_indexdef(format('%I.%I', schemaname, indexname)::regclass) | |
from pg_indexes | |
where schemaname not in ('pg_catalog', 'information_schema') | |
and schemaname not like 'pg_temp%'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment