postgres
Attach to running DB
Install the client app:
$ apt-get install postgresql-client --yes
Create database
CREATE DATABASE "<db_name>";
$ createdb "<db_name>"
- https://www.postgresql.org/docs/9.0/static/sql-createdatabase.html
- https://www.postgresql.org/docs/9.1/static/app-createdb.html
List all databases
# From within the REPL
postgres=# \l
# From shell
$ psql -U <username> -l
Connect to specific database
postgres=# \c db_name