PostgreSQL is the database that we use on production, and sometimes is is necessary to test stuff with it locally.
There are two main types of run with PostgreSQL:
- Local run as identical to deployment as possible: uses PostgreSQL, but also sets as much as possible to match production, including Next.js rendering stuff
- Local development run with PostgreSQL: uses PostgreSQL database, but keeps everything else in development mode
To interactively inspect the local development database use our helper at web/bin/psql:Commands can be run as usual:It uses
web/bin/psql
web/bin/psql -c 'SELECT * FROM "Article";'
PGPASSWORD
is mentioned at: stackoverflow.com/questions/6405127/how-do-i-specify-a-password-to-psql-non-interactively