Press "Enter" to skip to content

Getting Started with Postgres’s psql

Ryan Booz provides a primer:

PostgreSQL has a separate command-line tool that’s been available for decades and is included with any installation of PostgreSQL. Many long-term PostgreSQL users, developers, and administrators rely on psql to help them quickly connect to databases, examine the schema, and execute SQL queries.

Knowing how to install and use basic psql commands is an essential skill to have for anyone that will connect to PostgreSQL.

Most of the article covers installation and starting up, but before you can write queries, you’ve got to connect to the server and database.