psql, which is included in the PostgreSQL package, is a command-line interface for interacting with PostgreSQL databases. As RisingWave is wire-compatible with PostgreSQL, psql becomes an essential tool for you to connect to RisingWave, issue SQL queries, and manage database objects.

To install psql without the rest of the PostgreSQL package, you can use your operating system’s package manager. Here are the steps to install psql on some common operating systems:

  1. Install Homebrew if you don’t have it on your mac.
  2. Update package definitions (formulae).
brew update
  1. Install libpq.
brew install libpq

Homebrew’s package for the PostgreSQL client tools is libpq, which includes psql, pg_dump, and other client utilities.

  1. Link all binaries of libpq to /usr/local/bin.
brew link --force libpq

libpq does not install itself in the /usr/local/bin directory. Thus, you need to link them to the directory to use the installed binaries.