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 -
Installing RavenDB as a secure server allows you to authenticate PostgreSQL clients, granting access only to clients that provide the proper credentials.
- In this page:
Enabling PostgreSQL support
- Your RavenDB license determines which features are available.
Visit Studio's About page to find which features are included in your license.
PostgreSQL and Power BI support
If your current license doesn't include the PostgreSQL support, acquire one that does.
- PostgreSQL protocol support must be explicitly enabled in your settings.
Add this line to your server's
settings.jsonfile to enable the PostgreSQL protocol:
- If your license includes the PostgreSQL Protocol Support but not
Power BI Support, enable RavenDB's Experimental Features
by adding this line to your server's
If your license allows both features, you do not need to enable Experimental Features.
- 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:
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.