Skip to content

Instantly share code, notes, and snippets.

@johndhancock
Last active October 18, 2017 16:41
Show Gist options
  • Save johndhancock/a07cc654d8fe6ae3db4af6c15576c128 to your computer and use it in GitHub Desktop.
Save johndhancock/a07cc654d8fe6ae3db4af6c15576c128 to your computer and use it in GitHub Desktop.

POSTGRESQL COMMAND LINE COMMANDS

Starting up a postgres database

pg_ctl -D /usr/local/var/postgres start

creating a database. This needs to be done via the command line outside of python

createdb <databasename>

viewing a database

psql <databasename>

viewing tables from within a database

\dt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment