Skip to main content

Extensions for PostgreSQLs

Extensions are installable packages that add features to a PostgreSQL database with CREATE EXTENSION. Popular ones include PostGIS for geospatial data, pg_trgm for fuzzy text matching, pg_stat_statements for query statistics, and uuid-ossp or pgcrypto for identifiers and hashing. They are why one engine can cover many workloads.

Stage: Programming and Extensions · Part of the PostgreSQL roadmap · Last reviewed 19 November 2026

What to learn in Extensions

Extensions interview questions

What does pg_stat_statements provide?

It tracks execution statistics for each normalised query, including calls, total and mean time and rows returned. Sorting by total time shows which queries use the most database resources and deserve indexes or rewrites.

How does pg_trgm help text search?

It breaks strings into three-character sequences and measures similarity between them. With a GIN or GiST trigram index, queries using LIKE, ILIKE or the similarity operator become fast and tolerate typos.

Where Extensions fits in the PostgreSQL roadmap

Extensions belongs to the Programming and Extensions stage (intermediate level). Extend the database.

Back to the full PostgreSQL roadmap