# Extensions (/docs/postgres/database/postgres-extensions)

Location: Postgres > Database > Extensions

Prisma Postgres supports standard [PostgreSQL extensions](https://www.postgresql.org/docs/current/sql-createextension.html). Extensions add extra functionality to your database. Things like vector search, full-text search, fuzzy matching, and cryptographic functions.

Enabling an extension [#enabling-an-extension]

Enable any [supported extension](#supported-extensions) using standard SQL:

```sql
CREATE EXTENSION IF NOT EXISTS vector;
```

This works from any PostgreSQL client. `psql`, a GUI like TablePlus, a migration file, or a raw SQL query from your application.

The `plpgsql` extension is enabled by default on all Prisma Postgres instances.

Using extensions with Prisma ORM [#using-extensions-with-prisma-orm]

Prisma ORM doesn't natively support all extension types yet. For extensions that introduce custom types (like `vector` from pgvector), you can use [customized migrations](/orm/prisma-migrate/workflows/customizing-migrations) and [raw SQL](/orm/prisma-client/using-raw-sql) or [TypedSQL](/orm/prisma-client/using-raw-sql/typedsql) to work with them.

Here's a walkthrough using pgvector as an example.

1. Create an empty migration [#1-create-an-empty-migration]

  

#### npm

```bash
npx prisma migrate dev --name add-pgvector --create-only
```

#### pnpm

```bash
pnpm dlx prisma migrate dev --name add-pgvector --create-only
```

#### yarn

```bash
yarn dlx prisma migrate dev --name add-pgvector --create-only
```

#### bun

```bash
bunx --bun prisma migrate dev --name add-pgvector --create-only
```

The `--create-only` flag creates the migration file without applying it, so you can add custom SQL first.

2. Add the extension and table to your migration [#2-add-the-extension-and-table-to-your-migration]

Edit the generated migration file to enable the extension and create your table:

```sql
-- prisma/migrations/<timestamp>-add-pgvector/migration.sql
CREATE EXTENSION IF NOT EXISTS vector;

CREATE TABLE "Document" (
  id SERIAL PRIMARY KEY,
  title TEXT NOT NULL,
  embedding VECTOR(4) -- dimensions depend on your embedding model
);
```

3. Apply the migration [#3-apply-the-migration]

  

#### npm

```bash
npx prisma migrate deploy
```

#### pnpm

```bash
pnpm dlx prisma migrate deploy
```

#### yarn

```bash
yarn dlx prisma migrate deploy
```

#### bun

```bash
bunx --bun prisma migrate deploy
```

4. Pull the table into your Prisma schema [#4-pull-the-table-into-your-prisma-schema]

Introspect your database to update your Prisma schema with the new table:

  

#### npm

```bash
npx prisma db pull
```

#### pnpm

```bash
pnpm dlx prisma db pull
```

#### yarn

```bash
yarn dlx prisma db pull
```

#### bun

```bash
bunx --bun prisma db pull
```

Because Prisma ORM doesn't natively support the `VECTOR` type, it will be represented as [`Unsupported`](/orm/prisma-schema/data-model/models#unsupported-types):

```prisma
model Document {
  id        Int                    @id @default(autoincrement())
  title     String
  embedding Unsupported("vector")?
}
```

5. Query with raw SQL [#5-query-with-raw-sql]

Use `$executeRaw` or `$queryRaw` to interact with extension-specific types:

```ts
await prisma.$executeRaw`
  INSERT INTO "Document" (title, embedding)
  VALUES ('My Title', '[1,22,1,42]'::vector)
`;
```

You can also use [TypedSQL](/orm/prisma-client/using-raw-sql/typedsql) for type-safe queries.

Supported extensions [#supported-extensions]

<details>
  <summary>
    View all supported extensions
  </summary>

  * [`amcheck`](https://www.postgresql.org/docs/current/amcheck.html)
  * [`autoinc`](https://www.postgresql.org/docs/current/contrib-spi.html)
  * [`bloom`](https://www.postgresql.org/docs/current/bloom.html)
  * [`btree_gin`](https://www.postgresql.org/docs/current/btree-gin.html)
  * [`btree_gist`](https://www.postgresql.org/docs/current/btree-gist.html)
  * [`citext`](https://www.postgresql.org/docs/current/citext.html)
  * [`cube`](https://www.postgresql.org/docs/current/cube.html)
  * [`dblink`](https://www.postgresql.org/docs/current/dblink.html)
  * [`dict_int`](https://www.postgresql.org/docs/current/dict-int.html)
  * [`dict_xsyn`](https://www.postgresql.org/docs/current/dict-xsyn.html)
  * [`earthdistance`](https://www.postgresql.org/docs/current/earthdistance.html)
  * [`file_fdw`](https://www.postgresql.org/docs/current/file-fdw.html)
  * [`fuzzystrmatch`](https://www.postgresql.org/docs/current/fuzzystrmatch.html)
  * [`hstore`](https://www.postgresql.org/docs/current/hstore.html)
  * [`insert_username`](https://www.postgresql.org/docs/current/contrib-spi.html)
  * [`intagg`](https://www.postgresql.org/docs/current/intagg.html)
  * [`intarray`](https://www.postgresql.org/docs/current/intarray.html)
  * [`isn`](https://www.postgresql.org/docs/current/isn.html)
  * [`lo`](https://www.postgresql.org/docs/current/lo.html)
  * [`ltree`](https://www.postgresql.org/docs/current/ltree.html)
  * [`moddatetime`](https://www.postgresql.org/docs/current/contrib-spi.html)
  * [`pageinspect`](https://www.postgresql.org/docs/current/pageinspect.html)
  * [`pg_buffercache`](https://www.postgresql.org/docs/current/pgbuffercache.html)
  * [`pg_freespacemap`](https://www.postgresql.org/docs/current/pgfreespacemap.html)
  * [`pg_prewarm`](https://www.postgresql.org/docs/current/pgprewarm.html)
  * [`pg_search`](https://pgxn.org/dist/pg_search/)
  * [`pg_stat_statements`](https://www.postgresql.org/docs/current/pgstatstatements.html)
  * [`pg_surgery`](https://www.postgresql.org/docs/current/pgsurgery.html)
  * [`pg_trgm`](https://www.postgresql.org/docs/current/pgtrgm.html)
  * [`pg_visibility`](https://www.postgresql.org/docs/current/pgvisibility.html)
  * [`pg_walinspect`](https://www.postgresql.org/docs/current/pgwalinspect.html)
  * [`pgcrypto`](https://www.postgresql.org/docs/current/pgcrypto.html)
  * [`pgrowlocks`](https://www.postgresql.org/docs/current/pgrowlocks.html)
  * [`pgstattuple`](https://www.postgresql.org/docs/current/pgstattuple.html)
  * [`plpgsql`](https://www.postgresql.org/docs/current/plpgsql.html) *(enabled by default)*
  * [`postgres_fdw`](https://www.postgresql.org/docs/current/postgres-fdw.html)
  * [`refint`](https://www.postgresql.org/docs/current/contrib-spi.html)
  * [`seg`](https://www.postgresql.org/docs/current/seg.html)
  * [`sslinfo`](https://www.postgresql.org/docs/current/sslinfo.html)
  * [`tablefunc`](https://www.postgresql.org/docs/current/tablefunc.html)
  * [`tcn`](https://www.postgresql.org/docs/current/tcn.html)
  * [`tsm_system_rows`](https://www.postgresql.org/docs/current/tsm-system-rows.html)
  * [`tsm_system_time`](https://www.postgresql.org/docs/current/tsm-system-time.html)
  * [`unaccent`](https://www.postgresql.org/docs/current/unaccent.html)
  * [`uuid-ossp`](https://www.postgresql.org/docs/current/uuid-ossp.html)
  * [`vector`](https://github.com/pgvector/pgvector)
  * [`xml2`](https://www.postgresql.org/docs/current/xml2.html)
</details>

Don't see what you need? [Request an extension](https://pris.ly/i-want-extensions).

Limitations [#limitations]

* **Prisma Studio** does not support tables that use custom types from extensions (e.g., `VECTOR`). Queries against those tables will return a deserialization error.
* **Prisma ORM** does not natively support all extension types. Custom types are represented as [`Unsupported`](/orm/prisma-schema/data-model/models#unsupported-types) in your schema and must be queried with [raw SQL](/orm/prisma-client/using-raw-sql).
* **PostGIS** is coming in 2026.

## Related pages

- [`Backups`](https://www.prisma.io/docs/postgres/database/backups): Manage and restore database backups in Prisma Postgres
- [`Connecting to your database`](https://www.prisma.io/docs/postgres/database/connecting-to-your-database): Choose the right Prisma Postgres connection string for your runtime, tool, and workload.
- [`Connection pooling`](https://www.prisma.io/docs/postgres/database/connection-pooling): Use Prisma Postgres connection pooling for concurrent application traffic.
- [`Local development`](https://www.prisma.io/docs/postgres/database/local-development): Set up and use Prisma Postgres for local development
- [`Query Insights`](https://www.prisma.io/docs/postgres/database/query-insights): Inspect slow queries, connect Prisma calls to SQL, and apply focused fixes with Prisma Postgres.