Skip to content

Instantly share code, notes, and snippets.

@hermpheus
Created July 12, 2016 19:05
Show Gist options
  • Save hermpheus/8dd9c59a560e2646467bbfecefe9855d to your computer and use it in GitHub Desktop.
Save hermpheus/8dd9c59a560e2646467bbfecefe9855d to your computer and use it in GitHub Desktop.
PostgreSQL: Select all databases and comments
SELECT
datname
,description
FROM pg_shdescription
INNER JOIN pg_database on objoid = pg_database.oid
ORDER BY datname;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment