> ## Documentation Index
> Fetch the complete documentation index at: https://docs.powabase.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Extensions

> The Postgres extensions preloaded in every Powabase project, the ones you can CREATE EXTENSION yourself, and where each one lives.

A Powabase project's Postgres comes with a set of extensions preloaded for the platform's own services. You can use them too, and you can install additional ones from the Postgres image's shipped library set.

For the broader concept of schemas, see [Schemas](/concepts/schemas). For pgvector specifically, see [User-managed pgvector](/guides/user-pgvector). For pg\_net via the DB-webhook pattern, see [DB webhooks](/guides/db-webhooks).

## Preloaded in every project

These extensions are available at project provision time without `CREATE EXTENSION`. Powabase's own init scripts add `vector` and `pg_net`; the others come from the upstream `supabase/postgres:15.8.1.085` image's default init.

| Extension           | Schema            | What it does                                                                            |
| ------------------- | ----------------- | --------------------------------------------------------------------------------------- |
| `vector` (pgvector) | `public`          | Vector similarity search with HNSW / IVFFlat indexes                                    |
| `pg_net`            | `extensions`      | Async HTTP from inside Postgres (used by DB webhooks)                                   |
| `pgcrypto`          | `public`          | Cryptographic functions (`gen_random_uuid`, `crypt`, `digest`, etc.)                    |
| `uuid-ossp`         | `extensions`      | Alternative UUID generation (`uuid_generate_v4`, etc.)                                  |
| `pg_graphql`        | preloaded library | GraphQL on top of Postgres, callable via `POST /rest/v1/rpc/graphql`                    |
| `vault`             | preloaded library | Encrypted secret storage. Available via direct Postgres only; no platform code uses it. |

`pgcrypto`'s `gen_random_uuid()` is what your `CREATE TABLE ... id uuid DEFAULT gen_random_uuid()` columns use. No setup needed.

`pg_net` is in the `extensions` schema (not `public`) so its functions stay out of the default search path. Call them as `extensions.http_post(...)`, or `SET search_path TO extensions, public` first.

## You-can-install

The Postgres image (`supabase/postgres:15.8.1.085`) includes a long list of extensions you can install yourself with `CREATE EXTENSION`. The most useful for application code:

| Extension                 | Schema       | What it does                                                                    |
| ------------------------- | ------------ | ------------------------------------------------------------------------------- |
| `pg_trgm`                 | `extensions` | Trigram similarity for fuzzy text matching, useful for autocomplete             |
| `unaccent`                | `extensions` | Strip accents from text for diacritic-insensitive search                        |
| `citext`                  | `extensions` | Case-insensitive text type: `WHERE email = 'foo@bar.com'` matches `Foo@Bar.com` |
| `btree_gin`, `btree_gist` | `extensions` | GIN / GiST index support for scalar types alongside JSONB / tsvector            |
| `postgres_fdw`            | `extensions` | Query a different Postgres database as if it were a local table                 |
| `hstore`                  | `extensions` | Key-value type (less common now that JSONB exists, but still supported)         |
| `tsm_system_rows`         | `extensions` | `TABLESAMPLE SYSTEM_ROWS(N)` for fast random sampling                           |
| `intarray`                | `extensions` | GIN-indexable integer-array operators                                           |

Install them in the `extensions` schema:

```sql theme={null}
CREATE EXTENSION IF NOT EXISTS pg_trgm SCHEMA extensions;
CREATE EXTENSION IF NOT EXISTS citext SCHEMA extensions;
```

You'll need to be connected as `supabase_admin` (via the Database URL); `anon`, `authenticated`, and `service_role` don't have CREATE on the database.

## Not available

Some extensions you might be looking for that aren't in the Powabase Postgres image:

| Extension                  | Status                                                                                                            |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `pg_cron`                  | Not enabled. Scheduling jobs in-database isn't supported on Powabase; use a workflow with a cron trigger instead. |
| `pg_jsonschema`            | Not present. Use CHECK constraints or application-level validation.                                               |
| `pgsodium`                 | Not enabled. Use `pgcrypto` for crypto, or move secrets to your application config.                               |
| `postgis`                  | Not in the standard image. If you need it, contact support.                                                       |
| `pgmq`, `pg_partman`, etc. | Various community extensions. File a platform request if you need one.                                            |

The platform team can add extensions on request for enterprise customers.

## Listing what's available

To see what's installed in your project right now:

```sql theme={null}
SELECT extname, nspname AS schema, extversion
FROM pg_extension e
JOIN pg_namespace n ON n.oid = e.extnamespace
ORDER BY extname;
```

To see what's available to `CREATE EXTENSION`:

```sql theme={null}
SELECT name, default_version
FROM pg_available_extensions
WHERE installed_version IS NULL
ORDER BY name;
```

This shows extensions the image has shipped but you haven't installed. Run `CREATE EXTENSION foo SCHEMA extensions` to install any of them.

## What lives where

Extensions install their objects (functions, types, tables) into a schema. Powabase's convention is to put platform-preloaded extensions in `extensions` (for clean search\_path defaults), with `vector` and `pgcrypto` in `public` (the standard Supabase pattern). Anything you `CREATE EXTENSION` yourself should also go in `extensions`.

If you're getting "function does not exist" errors after installing an extension, check the schema. Most extension functions don't end up in `public` and need to be qualified (`extensions.http_post(...)`) or have `extensions` added to your `search_path`.

## Next steps

<CardGroup cols={2}>
  <Card title="Schemas" href="/concepts/schemas">
    The five schemas extensions might land in.
  </Card>

  <Card title="User-managed pgvector" href="/guides/user-pgvector">
    The most common use of a preloaded extension.
  </Card>

  <Card title="DB webhooks" href="/guides/db-webhooks">
    The pg\_net-based pattern that turns Postgres changes into HTTP calls.
  </Card>

  <Card title="Direct Postgres" href="/guides/direct-postgres">
    The connection you'll use to install extensions.
  </Card>
</CardGroup>
