---
title: "PostgreSQL Protocol: Overview"
description: "* RavenDB implements the PostgreSQL protocol, allowing applications and libraries that"
url: "https://docs.ravendb.net/6.2/integrations/postgresql-protocol/overview"
version: "6.2"
---

# PostgreSQL Protocol: Overview

> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

## PostgreSQL Protocol: Overview

- RavenDB implements the PostgreSQL protocol, allowing applications and libraries that
  use PostgreSQL, e.g. [Power BI](https://docs.ravendb.net/6.2/integrations/postgresql-protocol/power-bi.md), to
  retrieve data from a RavenDB database.

- To use RavenDB as a PostgreSQL server you need -
  - a [license](https://docs.ravendb.net/6.2/start/licensing/licensing-overview.md) that enables the PostgreSQL Protocol.
  - To explicitly enable PostgreSQL in your [settings](https://docs.ravendb.net/6.2/server/configuration/configuration-options.md).

- [Installing](https://docs.ravendb.net/6.2/start/installation/setup-wizard/overview.md) RavenDB as
  a [secure](https://docs.ravendb.net/6.2/server/security/overview.md) server allows you to authenticate
  PostgreSQL clients, granting access only to clients that provide the proper credentials.

> **Note**
>
> - In this page:
>   - [Enabling PostgreSQL support](#enabling-postgresql-support)
>     - [License](#license)
>     - [Settings](#settings)
>     - [PostgreSQL Port](#postgresql-port)
>   - [Security](#security)

## Enabling PostgreSQL support

### License

- Your RavenDB license determines which features are available for your server.
- Visit Studio's [About](https://docs.ravendb.net/6.2/start/licensing/licensing-overview.md#manage-license-view)
  page to find which features are included in your license.
- PostgreSQL is enabled for all licenses.
- To [use Power BI with RavenDB as its PostgreSQL server](https://docs.ravendb.net/6.2/integrations/postgresql-protocol/power-bi.md),
  your license must explicitly enable Power BI.  
  If your current license doesn't include Power BI Support, you can acquire one that does [here](https://ravendb.net/buy).

### Settings

- PostgreSQL protocol support must be explicitly enabled in your [settings](https://docs.ravendb.net/6.2/server/configuration/configuration-options.md#settingsjson).  
  Add this line to your server's `settings.json` file to enable the PostgreSQL protocol:

```json
"Integrations.PostgreSQL.Enabled": true
```

- PostgreSQL is an experimental feature. To enable it, enable RavenDB's
  [Experimental Features](https://docs.ravendb.net/6.2/server/configuration/core-configuration.md#featuresavailability)
  by adding this line to your server's `settings.json` file:

```json
"Features.Availability": "Experimental"
```

### PostgreSQL Port

- To access RavenDB, your clients need not only its **URL** but also its
  PostgreSQL **Port** number.  
  By default, the port number is *5433*.
- To use a different port, add the following line to your settings.json file, with a port number
  of your choice:

```json
"Integrations.PostgreSQL.Port": 5433
```

## Security

Allowing just any client to connect to your database (via PostgreSQL or otherwise)
without authentication is risky, and should in general be avoided.

> **Warning**
>
> If RavenDB is not set as a secure server, it will require no authentication over the PostgreSQL protocol.

To allow access only for authorized clients -

- Set RavenDB as a [Secure Server](https://docs.ravendb.net/6.2/server/security/overview.md).  
  This will allow RavenDB to authenticate PostgreSQL clients, in addition
  to many other security measures this setup provides.
- Create [PostgreSQL Credentials](https://docs.ravendb.net/6.2/studio/database/settings/integrations.md) using RavenDB Studio.  
  PostgreSQL credentials are a **user name** and a **password**, that a client
  would have to provide in order to access the database.
