Skip to content

Instantly share code, notes, and snippets.

@nounderline
Created January 25, 2014 21:41
Show Gist options
  • Save nounderline/8624080 to your computer and use it in GitHub Desktop.
Save nounderline/8624080 to your computer and use it in GitHub Desktop.
[Postgres] Manage database
-- List databases --
\list
SELECT datname FROM pg_database WHERE datistemplate = false;
-- List tables from current database --
\dt
SELECT table_schema, table_name FROM information_schema.tables ORDER BY table_schema, table_name;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment