Skip to content

Latest commit

 

History

History
100 lines (81 loc) · 4.21 KB

File metadata and controls

100 lines (81 loc) · 4.21 KB
title PostgreSQL Protocol: Overview
sidebar_label Overview
sidebar_position 0

import Admonition from '@theme/Admonition'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import CodeBlock from '@theme/CodeBlock'; import LanguageSwitcher from "@site/src/components/LanguageSwitcher"; import LanguageContent from "@site/src/components/LanguageContent";

PostgreSQL Protocol: Overview

  • RavenDB implements the PostgreSQL protocol, allowing applications and libraries that use PostgreSQL, e.g. Power BI, to retrieve data from a RavenDB database.

  • To use RavenDB as a PostgreSQL server you need -

    • a license that enables the PostgreSQL Protocol.
    • To explicitly enable PostgreSQL in your settings.
  • Installing RavenDB as a secure server allows you to authenticate PostgreSQL clients, granting access only to clients that provide the proper credentials.

## Enabling PostgreSQL support

License

  • Your RavenDB license determines which features are available for your server.
  • Visit Studio's About 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, your license must explicitly enable Power BI.
    If your current license doesn't include Power BI Support, you can acquire one that does here.

Settings

  • PostgreSQL protocol support must be explicitly enabled in your settings.
    Add this line to your server's settings.json file to enable the PostgreSQL protocol:
{`"Integrations.PostgreSQL.Enabled": true `} * PostgreSQL is an experimental feature. To enable it, enable RavenDB's [Experimental Features](../../server/configuration/core-configuration.mdx#featuresavailability) by adding this line to your server's `settings.json` file: {`"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:
{`"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.
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.
    This will allow RavenDB to authenticate PostgreSQL clients, in addition to many other security measures this setup provides.
  • Create PostgreSQL Credentials 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.