Extensions

Package a PostgreSQL extension, select it in your SDK, and enable it with SQL.

Extensions add PostgreSQL functionality such as vector search, spatial types, and additional operators. Find a supported SQL name in the extension catalog.

Add an extension in three steps

  1. Package it. Include the extension resources and any required native code for your application target.
  2. Select it before opening. Use your SDK's configuration, typed value, or descriptor.
  3. Enable it with SQL. Run the extension's documented activation, usually CREATE EXTENSION.

For example, after packaging and selecting vector:

CREATE EXTENSION IF NOT EXISTS vector;
CREATE TABLE embeddings (id bigint PRIMARY KEY, embedding vector(3));

Selection makes an extension available; it does not run your schema migrations. Some catalog entries have different activation requirements, which the catalog records.

Follow your SDK's packaging path

SDKPackaging and selection
RustNative builder selection such as oliphaunt_extension_vector::VECTOR
SwiftGenerate/link a Swift extension product and select its .resource
KotlinSelect in Gradle, rebuild, and select its OliphauntExtension value at open
React NativeInstall extension packages, configure the plugin, rebuild, and select at open
TypeScriptInstall/import the native extension descriptor and pass it at open
WASIX RustAdd the extension crate with its wasix feature and select its typed value
WASIX TypeScriptInstall/import the -wasix descriptor package and pass the descriptor
C ABILink/register static modules and provide matching resources

Use exact SQL extension names. Selection can bring required dependencies with it; it does not select unrelated extensions through aliases or bundles.

Match runtime compatibility

Native and WASIX extension packages are distinct. A package ending in -wasix supplies a WASIX descriptor; a native package cannot be substituted for it.

External extension package versions describe Oliphaunt packaging and can differ from the upstream PostgreSQL extension version. Match the package to its compatible Oliphaunt runtime rather than assuming equal version numbers mean compatibility.

Reopen an extension-bearing database with its required code and resources available. A database backup preserves extension objects and data, not the extension binaries in your app.

Upgrade an extension

Read the extension and runtime release notes, back up the database, update the compatible application resources, and apply any documented SQL migration. Do not assume opening a database automatically runs ALTER EXTENSION ... UPDATE.

Diagnose an unavailable extension

Check the exact SQL name, target support, installed package, build-time selection, and open-time selection. For mobile apps, rebuild the native application after changing extensions. For a restored database, verify the destination app includes the original database's required extensions.