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

# Supported PostgreSQL extensions: citext, pg_trgm, pgcrypto

> DBHost supports three PostgreSQL extensions: citext, pg_trgm and pgcrypto. Install or upgrade them from the dashboard, API or CLI.

DBHost supports exactly three PostgreSQL 16 extensions:

| Extension | Typical use |
| - | - |
| `citext` | Case-insensitive text, for example email addresses |
| `pg_trgm` | Trigram similarity and fast `LIKE` / `ILIKE` search with GIN or GiST indexes |
| `pgcrypto` | Hashing, random UUIDs and symmetric encryption functions |

Other extensions are not offered, and you cannot install arbitrary extensions
with `CREATE EXTENSION`.

## Requirements

* The database uses [managed SQL roles](/guides/database-roles). Install and
  upgrade are not available on single-login databases.
* The database owner performs the change.
* API and CLI access require Pro or Business. The dashboard works on every plan.

## Install or upgrade

**Dashboard:** open the database page and find **PostgreSQL extension
catalog**. It lists each extension with its available version, the version
installed in this database, and a DBHost status. Use the action next to an
extension to install or upgrade it.

**API:** read the inventory with `GET /api/v1/databases/{id}/extensions`, then
submit one operation:

```bash theme={null}
curl -X POST https://dbhost.app/api/v1/databases/<database-id>/extensions/operations \
  -H "Authorization: Bearer $DBHOST_API_KEY" \
  -H "Idempotency-Key: install-citext-1" \
  -H "Content-Type: application/json" \
  -d '{"extension":"citext","kind":"install"}'
```

`kind` is `install` or `upgrade`. Poll
`GET /api/v1/databases/{id}/extensions/operations/{operationId}` until it
finishes. If a response is uncertain, retry with the same idempotency key; a
new key requests a new operation.

**CLI:**

```bash theme={null}
dbhost databases extensions <database-id>
dbhost databases extensions install <database-id> citext --idempotency-key install-citext-1
dbhost databases extensions status <database-id> <operation-id>
```

`pgcrypto` through the CLI requires CLI 0.3.7 or newer.

## After installing

Extensions are installed into the database, so your migrations can use them
directly, for example `email citext NOT NULL` or
`CREATE INDEX ... USING gin (name gin_trgm_ops)`. DBHost logical backups
include the extension.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.