liveBook · Manning

Database extension

As explained in Just Use Postgres!

A Postgres extension is an installable package that adds data types, functions, operators, indexes, or other capabilities to a PostgreSQL database system.

A Postgres extension is an installable package that adds data types, functions, operators, indexes, or other capabilities to PostgreSQL. Its ecosystem lets Postgres support workloads such as JSON, time-series, full-text, vector, geospatial, messaging, and analytical processing beyond the core engine. section 1.1 section 7.3

Postgres supports extensions through several integration mechanisms:

  • Catalog-driven operations let extensions add database objects such as data types and functions through system catalogs. section 7.2
  • Database hooks let extensions inject logic into events such as query planning, execution, and authentication. section 7.2
  • Extension logic can use SQL, PL/pgSQL, C, or Rust; compiled implementations load shared libraries at runtime without recompiling Postgres. section 7.2
  • Extensions must be installed on the database server and enabled for an individual database before use. section 7.2

Inspect extensions available to a database

Query pg_available_extensions to inspect names, descriptions, default versions, and installed versions. A blank installed_version means the extension is available on the server but not enabled in the current database. Filtering with installed_version IS NOT NULL lists enabled extensions; a sample database reports only plpgsql installed. section 7.2.1

SELECT count(*) FROM pg_available_extensions;

 count
-------
    45
(1 row)

Use the supplied result to verify how many extensions are available on a Postgres server; the example reports 45. section 7.2.1

How Just Use Postgres! covers it

How deep it goes
Explains catalogs, hooks, dynamic loading, installation, and inspection, but only surveys extension categories and omits detailed deployment guidance.
Examples
Demonstrates pg_available_extensions, expanded psql output, installed-version filtering, and bundled extensions including plpgsql.
What it assumes
Assumes basic PostgreSQL access and psql usage while teaching extension purpose, integration mechanisms, availability checks, and enablement boundaries.
What you can do after
Operate/configure extensions by inspecting server availability and distinguishing available versions from extensions enabled in a database.
How it connects
Connects extensions with system catalogs, database hooks, procedural languages, vector databases, time-series data, geospatial data, and message queues.

Also explained in

Compare how 2 books explain database extension →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Just Use Postgres!. The section links point to the parts of the book it draws on.