PostgreSQL tutorials

PostgreSQL Tutorials: Learn PostgreSQL Step by Step

Every PostgreSQL tutorial on DatabaseFAQs.com, grouped by topic. Install it, connect with psql or pgAdmin, then learn tables, queries, dates and PL/pgSQL.

Our newer and rewritten examples are tested on PostgreSQL 18.

  • 105free PostgreSQL tutorials
  • 15topics
  • Oct 2026last updated

New to PostgreSQL? Start here

Read these in order. Each one builds on the one before it.

  1. How to Download and Install PostgreSQL on WindowsInstall PostgreSQL and pgAdmin on Windows.
  2. How to Connect to a PostgreSQL Database (psql, pgAdmin, Linux, Python)Connect with psql, pgAdmin or code.
  3. How to Create Database in PostgreSQLCreate your first database.
  4. How to create a table in PostgreSQLCreate a table with the right data types.
  5. PostgreSQL SELECTRead and filter your data.
  6. PostgreSQL JoinsCombine data from related tables.

The basics6

What it is, what it's good for, and the questions people ask before they commit to it.

Install, connect and tools8

Install it, connect to it, and get your tools working.

Databases, tables and columns18

Create and change databases, tables, columns, keys, indexes and views.

Data types6

Pick the right data type for every column.

SELECT queries, filtering and grouping10

Read data with SELECT, filter it, sort it and summarize it.

Joins2

Combine rows from two or more tables.

Insert, update and delete5

Add, change and remove rows safely.

Strings, numbers and conversions9

Work with text and numbers, and convert between types.

Dates and times13

Format, compare and calculate dates and times.

Functions7

Built-in functions and the ones you write yourself.

Stored procedures, variables and control flow5

Stored procedures, variables, IF/CASE logic, loops, error handling and transactions.

Users, logins and permissions3

Create users, reset passwords and grant the right permissions.

Backup, import/export and administration5

Back up, restore, import, export, migrate and monitor.

Errors and fixes3

The exact error message, what causes it and the steps that fix it.

Comparisons5

Side-by-side comparisons to help you choose.

Other database tutorials

Looking for everything, newest first? See the full tutorial list.

Frequently Asked Questions

Is PostgreSQL free?

Yes. PostgreSQL is open source and free to use for any purpose, including commercial production systems.

What’s the latest version of PostgreSQL?

PostgreSQL 18 is the newest major version (18.6 is the current minor release). Each major version is supported for five years after its first release.

Where should a beginner start?

Use the six-step path at the top of this page: install PostgreSQL, connect to it, create a database and a table, then learn SELECT and joins.

Should I use psql or pgAdmin?

Both are installed with PostgreSQL on Windows. pgAdmin is easier when you’re starting out; psql is faster once you know the commands and works over SSH on Linux servers.