Extensions
DB9 ships all extensions compiled into the server binary. There is no runtime dynamic loading, which is what buys you the guarantees below: there is nothing to install, no build step, no version skew between two databases, and every extension is available the moment a database exists. CREATE EXTENSION records install metadata per database rather than loading anything.
The trade is that the set is fixed. CREATE EXTENSION accepts exactly the names on this page and raises 42704 extension is not available for every other name — PostGIS, pg_trgm, ltree, citext and the rest of the PostgreSQL contrib ecosystem included.
CREATE EXTENSION accepts eleven names, and they fall into two groups:
- Eight functional extensions — fs9, parquet, vector, embedding, zhparser, http, pg_cron and uuid-ossp (
uuid_generate_v4()only). These add types, functions, or operators. - Three metadata-only shims — hstore, pgcrypto and plpgsql.
CREATE EXTENSIONsucceeds and writes apg_extensionrow so dumps and ORM bootstrap scripts restore unchanged, but none of them registers a function of its own, and thehstoretype name thathstoreadds topg_typecannot hold a value. Read the pgcrypto caution before you depend on any of them.
This page is the authoritative list; other pages link here rather than restating it.
Extensions by Task
Section titled “Extensions by Task”Files and Data
Section titled “Files and Data”| Extension | What it does | Docs |
|---|---|---|
| fs9 | Query, read, and write the database filesystem from SQL | fs9 reference |
| parquet | Read Parquet files from the filesystem or HTTP URLs into SQL tables | Parquet import |
Search
Section titled “Search”| Extension | What it does | Docs |
|---|---|---|
| vector | pgvector-compatible similarity search with HNSW indexing | Vector Search |
| embedding | Server-side text embedding via EMBEDDING() and EMBED_TEXT() — no external API needed | Vector Search |
| zhparser | Chinese full-text search tokenizer (jieba-rs, always available) | Full-Text Search |
English and general-purpose full-text search is not an extension — tsvector, tsquery, to_tsvector(), websearch_to_tsquery(), GIN indexes on tsvector and the rest of the FTS surface are core server features, so there is no fts name to pass to CREATE EXTENSION. See Full-Text Search. zhparser is the one FTS-related extension descriptor, and it covers Chinese tokenization only.
Integration and Automation
Section titled “Integration and Automation”| Extension | What it does | Docs |
|---|---|---|
| http | Make HTTP requests from SQL (GET, POST, PUT, DELETE, HEAD, PATCH as table functions) | HTTP client |
| pg_cron | Schedule SQL statements to run on a cron expression | pg_cron |
Compatibility
Section titled “Compatibility”| Extension | What it does | Docs |
|---|---|---|
| uuid-ossp | uuid_generate_v4() only — the other uuid-ossp functions (uuid_generate_v1(), uuid_generate_v3(), uuid_generate_v5(), uuid_nil(), …) fail with 42883 | uuid-ossp |
| hstore | Metadata only — hstore values are not supported (0A000). Use JSONB | hstore |
| pgcrypto | Metadata only — registers no functions. CREATE EXTENSION pgcrypto succeeds so Supabase and ORM bootstrap scripts restore unchanged, but crypt(), gen_salt(), hmac(), encrypt()/decrypt(), pgp_sym_encrypt() and gen_random_bytes() are not available | caution below |
| plpgsql | Metadata only — PL/pgSQL is compiled into the server and works with or without CREATE EXTENSION plpgsql; the statement exists so restored dumps do not fail | caution below |
Enabling Extensions
Section titled “Enabling Extensions”Most extensions require CREATE EXTENSION before use. A few are pre-enabled or always available.
Pre-enabled (available on every new database)
Section titled “Pre-enabled (available on every new database)”These extensions are installed automatically when a database is created:
-- Already enabled — no CREATE EXTENSION neededSELECT http_get('https://httpbin.org/get');SELECT count(*) FROM cron.job;- http — HTTP client functions available immediately
- pg_cron — Extension pre-installed; catalog and management functions (
cron.job,cron.unschedule, etc.) are available immediately, but job scheduling/execution is unavailable in the current release
Require CREATE EXTENSION
Section titled “Require CREATE EXTENSION”These extensions must be explicitly enabled — for fs9, only its table functions depend on it:
CREATE EXTENSION IF NOT EXISTS fs9;CREATE EXTENSION IF NOT EXISTS embedding;CREATE EXTENSION IF NOT EXISTS parquet;- embedding and parquet — until enabled, calls fail with
ERROR: extension "embedding" is not installed. Run: CREATE EXTENSION embedding(0A000), and the same message namingparquetforextensions.read_parquet(...). - fs9 — the scalar functions (
fs9_write,fs9_read,fs9_append,fs9_mkdir,fs9_exists,fs9_removeand the otherfs9_*file functions) work on a new database withoutCREATE EXTENSION, bare orextensions.-qualified, and calling them does not add fs9 topg_extension. The table functions —extensions.fs9(),extensions.fs9_events(),extensions.fs9_jg(),extensions.fs9_storage_stats()andextensions.fs9_cached_storage_stats()— fail withERROR: unsupported table-valued function: fs9(0A000, naming the function you called) until you runCREATE EXTENSION fs9.
Metadata shims (built-in, CREATE EXTENSION optional)
Section titled “Metadata shims (built-in, CREATE EXTENSION optional)”These need no CREATE EXTENSION — what they provide is built in, or, for hstore, not implemented at all — but running it records metadata in pg_extension for ORM and tool compatibility:
- vector — The
vectortype and operators (<->,<#>,<=>) work as built-ins. HNSW indexes can be created and the planner uses them for similarity search when the probe is a literal or a bound parameter and the query has aLIMITand noWHEREclause — see Vector Search.CREATE EXTENSION vectoris recommended so ORMs that checkpg_extensionsee it as installed. - uuid-ossp —
uuid_generate_v4()is built in, and it is the only uuid-ossp function DB9 has:uuid_generate_v1(),uuid_generate_v3(),uuid_generate_v5()anduuid_nil()fail with42883.CREATE EXTENSION "uuid-ossp"records metadata forpg_dump/pg_restorecompatibility. - hstore — Extension metadata only:
hstorevalues are not supported, so any use of the type fails with0A000 type "hstore" is not supportedand the hintUse jsonb instead.— store key-value data inJSONB. While the extension is registered,pg_dumpfails withcolumn "typanalyze" does not exist;DROP EXTENSION hstoreclears it. - pgcrypto — Metadata only, so Supabase and ORM bootstrap scripts that run
CREATE EXTENSION pgcryptosucceed unchanged. It registers no functions of its own:gen_random_uuid()anddigest()are DB9 built-ins that work with or without it. The rest of pgcrypto is not implemented — see the caution below. - plpgsql — PL/pgSQL is compiled in.
CREATE EXTENSION plpgsqlrecords metadata so restored dumps (which almost always contain it) do not fail.
Always available (no-op)
Section titled “Always available (no-op)”- zhparser — The Chinese full-text tokenizer is compiled in and always active.
CREATE EXTENSION zhparseris accepted but has no effect.
Extension Schemas
Section titled “Extension Schemas”Extensions install their functions into specific schemas:
| Extension | Default schema | Access pattern |
|---|---|---|
| http | extensions | http_get(...) for the scalar JSONB form; SELECT * FROM extensions.http_get(...) for the table form. The qualifier is not interchangeable — see http |
| fs9 | extensions | fs9_read(...) or extensions.fs9_read(...) — both resolve on the default search_path |
| embedding | extensions | embedding(...) — the bare name; extensions.embedding(...) does not resolve |
| parquet | extensions | SELECT * FROM extensions.read_parquet(...) — table-valued, FROM position only |
| pg_cron | cron | cron.schedule(...), cron.unschedule(...) |
| vector | public | Operators and type available directly |
| uuid-ossp | public | uuid_generate_v4() available directly |
| hstore | public | Metadata only — hstore values are not supported |
| pgcrypto | extensions | Metadata only — registers no functions (gen_random_uuid(), digest() are built-ins) |
| plpgsql | pg_catalog | Metadata only — PL/pgSQL is compiled in |
For vector, uuid-ossp, hstore, pgcrypto and plpgsql, CREATE EXTENSION ... SCHEMA accepts
only the schema in this table; naming another fails with
0A000 extension "vector" must be installed in schema "public". The vector type, its
operator classes and its operators are built in, so write them unqualified (OPERATOR(public.<=>)
fails with internal error): public.vector(3) and
extensions.vector(3) both fail with 42704 type "public.vector" does not exist (or
"extensions.vector"), and extensions.uuid_generate_v4() fails with 42883. pg_dump writes
these names schema-qualified — rewrite them before an import, as described in
Migrate from PostgreSQL and
Migrate from Supabase.
Choosing the Right Extension
Section titled “Choosing the Right Extension”| I want to… | Use |
|---|---|
| Store and search vector embeddings | vector + embedding |
| Build a RAG pipeline without external APIs | embedding + fs9 |
| Call an external API from SQL | http |
| Query files on the database filesystem | fs9 |
| Watch filesystem changes in real time | fs9 events + CLI watch |
| Import Parquet data | parquet |
| Schedule a recurring cleanup or report | pg_cron |
| Search text content | Full-Text Search |
| Generate UUIDs | uuid-ossp |
Next Steps
Section titled “Next Steps”- Architecture — How extensions fit into the DB9 server
- SQL Reference — SQL engine compatibility and features
- RAG with Built-in Embeddings — End-to-end tutorial using embedding() and vector search
- Analyze Agent Logs with fs9 — Tutorial: write and query agent logs from SQL
- HTTP from SQL — Tutorial: call APIs, webhooks, and enrich data from SQL
- Scheduled Jobs with pg_cron — Tutorial: periodic tasks, monitoring, and job management
- Agent Workflows — Extensions in agent pipelines
- CLI Reference — db9 db sql for running extension commands