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
- Package it. Include the extension resources and any required native code for your application target.
- Select it before opening. Use your SDK's configuration, typed value, or descriptor.
- 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
| SDK | Packaging and selection |
|---|---|
| Rust | Native builder selection such as oliphaunt_extension_vector::VECTOR |
| Swift | Generate/link a Swift extension product and select its .resource |
| Kotlin | Select in Gradle, rebuild, and select its OliphauntExtension value at open |
| React Native | Install extension packages, configure the plugin, rebuild, and select at open |
| TypeScript | Install/import the native extension descriptor and pass it at open |
| WASIX Rust | Add the extension crate with its wasix feature and select its typed value |
| WASIX TypeScript | Install/import the -wasix descriptor package and pass the descriptor |
| C ABI | Link/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.