# PostgreSQL

> A free, open-source SQL database with lots of tools. Many teams pick it first.

**Field:** Software Development  
**Category:** Databases  
**Also known as:** Postgres, psql

## Think of it like

Think of it like a big free toolbox. It has a tool for nearly every job.

## Definition

PostgreSQL is a free SQL database known for being careful. It is open source and full of tools. It keeps all four ACID promises and sticks close to the SQL standard. It can also store JSON, map data and text search in the same place. It began as a research project at a big school in 1986. Many teams now pick it as their first choice.

## Example

Lucy starts a new booking app and picks PostgreSQL. Its server listens on port 5432 by default.

## Example code

```console
$ psql -d shop -c "SELECT count(*) FROM orders;"
 count
-------
  1200
(1 row)
```

This asks a Postgres database how many orders it holds.

## Why it matters

PostgreSQL is a safe choice for most new apps. It grows with you from one user to millions.

## Common mistake

Running it with the default settings on a big server. Its memory settings start small, so raise them.

## Three principles

- **Free and open.** No licence fee.
- **Careful.** Strict about ACID and SQL.
- **Many features.** JSON, maps and text search too.

## Related terms

- [Relational Database](https://learn.benibix.com/term/development/relational-database)
- [MySQL](https://learn.benibix.com/term/development/mysql)
- [SQLite](https://learn.benibix.com/term/development/sqlite)
- [Structured Query Language (SQL)](https://learn.benibix.com/term/development/sql)
- [Supabase](https://learn.benibix.com/term/development/supabase)
- [pgvector](https://learn.benibix.com/term/ai/pgvector)

## Told apart from

- [PostgreSQL vs MySQL](https://learn.benibix.com/compare/postgresql-vs-mysql): Both are free SQL databases. PostgreSQL is stricter and has more tools; MySQL is simple to start and runs a huge share of websites.
- [Supabase vs PostgreSQL](https://learn.benibix.com/compare/supabase-vs-postgresql): People think Supabase is its own kind of database, and it is not. Under it sits a normal PostgreSQL database, the same one you can run yourself. Supabase adds login, file storage and a ready-made API around it. So the SQL you know from Postgres works there too.
- [SQLite vs PostgreSQL](https://learn.benibix.com/compare/sqlite-vs-postgresql): People think SQLite is a toy version of Postgres, and it is not. It is a different shape. SQLite has no server, and the whole database is one file inside your app. PostgreSQL is a server that many apps and users connect to at once. SQLite fits a phone app or a small site. Postgres fits a busy app with many writers.

---

Source: https://learn.benibix.com/term/development/postgresql
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
