Home

Getting started with psql

psql is a terminal-based front-end to PostgreSQL. It enables you to type in queries interactively, issue them to PostgreSQL, and see the query results.

Once you are ssh-ed into a lab machine, you can check the version of psql installed with:

psql --version

On a Hunter lab machine, this outputs:

psql (PostgreSQL) 10.18 (Ubuntu 10.18-0ubuntu0.18.04.1)

The docs for psql 10 can be found here or via command line by typing:

man psql

Here are some commonly used psql commands, once you have connected to the PostgreSQL database:

More Resources: