Touring psql Features

When connecting to PostgreSQL, you’ll need a client application. While there are great graphical (GUI) clients,[50] in this book, you’ll work from your terminal using the command-line (CLI) client psql.

psql is recommended for several reasons. psql ships with PostgreSQL, so it’s always available. psql can be used on remote hosts and offers low latency. As the native client for PostgreSQL, it’s well-tested and supported.

To learn more about why psql is recommended, and to expand on the meta-commands and tips and tricks you’ll use in this chapter, visit the appendix Appendix 2, Why psql? in the back of this book.

With that said, let’s begin using it.

In the last chapter, you configured DATABASE_URL, which specified a database ...

Get High Performance PostgreSQL for Rails now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.