DATA SOURCES
/
PostgreSQL
Getting Started
Tutorials
Datasources
Functions
Spaces
Components
Self Hosted
Settings

PostgreSQL

Internal supports the latest versions of PostgreSQL 10, 11, 12, 13, and 14.

How to connect

  • Display Name: Give your data source a name for use within Internal. 
  • Host: The hostname or IP address of your data source. 
  • Port: Port to connect to. By default, this is prefilled with standard values (PostgreSQL:5432).  
  • Username: Credentials for this data source.
  • Password: Credentials for this data source.
  • Database: The name of the database (this must match the actual name of your PostgreSQL database). 
Note: To connect with Internal, your data source must be publicly accessible and configured to accept connections from Internal’s IP addresses.

34.66.153.118/32
35.225.125.80/32 

Note: Localhost versions of PostgreSQL DB must be served to Internal via an internet-accessible host name. We recommend something like Ngrok to act as a proxy. Here's a good writeup of how to do so.

What happens when you connect

When you connect PostgreSQL to Internal, we'll generate the following for you automatically:

  1. A list, insert, update, and delete function for each table in the database (if the connecting user account has these privileges). List functions read data from your tables and allow you to display that data in components - think of these as prebuilt SQL queries, so you don't have to write queries for everything.


Note: Functions will not be generated if no primary keys are found in the connected database.

Filtering and Sorting

While Internal enables filtering and sorting on all columns, we recommend indexing columns on large tables to improve performance.

Permissions

Internal requires SELECT permissions in the pg_catalog schema in order to load your database schema information. We currently use the following tables:

  • pg_attrdef
  • pg_attribute
  • pg_class
  • pg_constraint
  • pg_depend
  • pg_namespace

MariaDB

Internal officially supports MariaDB 10.6.

Specifying Trusted Server Root Certificates

One can specify custom trusted server root certificates for specific data sources - Cassandra, HTTP, MongoDB, MySQL, PostgreSQL

  1. While setting up a new data source, ensure "require SSL" is selected
  2. In the righthand configuration panel, click the "Upload" button and select your certificate file
  1. Add the rest of the connection details and submit the form
  2. Test your DB connection by using it in a function in a Space

The parsed certificates completely replace the default system trusted certificates.