PostgreSQL

IntermediateLesson 2 of 1425 min, hands-on

psql and First Commands

Part of the PostgreSQL course

You now know what Postgres is for. The next problem is more practical: how do you actually talk to it? A running Postgres server just sits there listening on a network port, it has no windows, no buttons, nothing to click. Graphical database tools exist, but they are one more thing to install, they are not always available on a server you only reach over SSH, and every one of them is, under the hood, just sending...

Your workspace already has a Postgres server running and a superuser account called postgres. Open a terminal and connect to it ...

What you'll learn

  • psql command line client
  • Connecting as postgres user
  • Meta commands like \l \c \dt \d \q
  • Semicolons end statements
  • Multiline queries
  • SELECT version()

Work through psql and First Commands

Sign in free and open the PostgreSQL course. Work through the lesson, and ask the AI tutor when you get stuck.