← Back to PostgreSQL Course | Chapter 1: Introduction | Lesson 1 of 7

What is PostgreSQL

PostgreSQL is a powerful, free relational database that stores data in tables and answers questions written in SQL.

In this page:

  1. What is PostgreSQL

What is PostgreSQL

PostgreSQL (often called Postgres) is an open-source object-relational database known for reliability, standards compliance and rich features such as JSONB, arrays, window functions, full-text search and extensions like PostGIS.

It uses MVCC for concurrency and supports ACID transactions. Note: the editor on this site runs SQL on SQLite, whose syntax is mostly compatible, so a few PostgreSQL-only features are shown as psql sessions instead.

Note: PostgreSQL was created at UC Berkeley and has been developed for over 30 years.

Example: What is PostgreSQL

bash
postgres=# SELECT version();
                                          version
--------------------------------------------------------------------------------------------
 PostgreSQL 16.2 (Debian 16.2-1.pgdg120+2) on x86_64-pc-linux-gnu, compiled by gcc 12.2.0
(1 row)

postgres=# SELECT 'Hello, PostgreSQL!' AS greeting;
      greeting
--------------------
 Hello, PostgreSQL!
(1 row)

⚠️ Run this in your own terminal or Node.js environment.

Related Topics
Common Mistakes
  1. Confusing PostgreSQL with MySQL syntax
  2. Assuming it is only for large companies
  3. Ignoring that it needs a server process
Chapter Summary
  • PostgreSQL is an open-source relational database
  • It supports ACID transactions
  • It has rich types like JSONB and arrays
  • It is extensible with extensions
🔒

Chapter Quiz — Complete all 7 topics to unlock

0/7 topics done

Complete these topics first:

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.