A database you can extend
Postgres is built to be extended. An extension is a packaged bundle of new data types, functions, operators, and index support that you install into a database with a single command. This keeps the core lean while letting specialized capabilities ship separately.
What an extension can add
- New data types with their own storage and operators.
- New functions and operators the planner can use.
- New index support, so custom types can be indexed with GiST or GIN.
Because operators integrate with the planner, an extension type can be queried as naturally as a built in one.
PostGIS as the flagship
PostGIS turns Postgres into a full geospatial database. It adds geometry and geography types and a large library of spatial functions.
- It stores points, lines, and polygons in dedicated types.
- It answers questions like distance, containment, and intersection.
- It uses GiST indexes to make spatial searches over millions of shapes fast.
Other popular extensions include one for trigram text similarity, one for cryptographic functions, and the foreign data wrapper machinery for querying remote sources.
Key idea
Extensions package new types, functions, operators, and index support into the database, and PostGIS uses that machinery to add geometry types and GiST indexed spatial queries that make Postgres a geospatial engine.