Skip to content

Interacting with Postgres

Glenn Piludu edited this page Mar 9, 2023 · 2 revisions

Connecting to the Development Database

It is useful to be able to query the development database while the app is running to debug or validate results.

  1. Install Postgres on your local machine by following the instructions here.

  2. In your terminal of choice, run

psql -h 127.0.0.1 -p 5433 -U postgres postgres

The password should also be postgres.

  1. Check that pe_dev is a table by running \l.

  2. Connect to pe_dev by using

\c pe_dev

You should be able to run queries as you would in any other db console. Make sure you add ; at the end of every query!

Alternative Methods

You may prefer to use a database interface with a nice GUI. There are a number of good ones, but a good free choice is Beekeeper Studio. The setup will be basically the same.

Clone this wiki locally