Created
January 15, 2015 16:05
-
-
Save lym/d9b83272bf2f7d0d8371 to your computer and use it in GitHub Desktop.
postgresql: retrieve owner of specified database
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 d.datname as "Name", | |
pg_catalog.pg_get_userbyid(d.datdba) as "Owner" | |
FROM pg_catalog.pg_database d | |
WHERE d.datname = 'database_name' | |
ORDER BY 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment