-
-
Save jerinisready/cfe00ad293ec3ac1736250750aaf4bba to your computer and use it in GitHub Desktop.
List all indexes in postgres database
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
# VIEW INDEXES applied on database. | |
select schemaname, tablename, indexname, indexdef from pg_indexes WHERE schemaname='public'; | |
# Create superuser for postgres on linux shell with postgres user. | |
user@ubuntu$ sudo su postgres | |
user@ubuntu$ createuser --interactive --pwprompt root | |
> Enter password for new role: ******** | |
> Enter it again: ******** | |
> Shall the new role be a superuser? (y/n) y | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment