What is PostgreSQL
PostgreSQL is a powerful, free relational database that stores data in tables and answers questions written in SQL.
In this page:
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
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
- Confusing PostgreSQL with MySQL syntax
- Assuming it is only for large companies
- 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: