Skip to main content

PostgreSQL

Squid can connect to a PostgreSQL database to serve as the data source for your Squid application.

PostgreSQL is an open source object-relational database system designed for reliability, feature robustness, and performance. With Squid, you can integrate with your PostgreSQL database and even join data with other database integrations.

To integrate your PostgreSQL database with Squid, complete the following steps:

  1. Open the Squid Console and select your application to use with PostgreSQL.
  2. Click the Integrations tab, and then click Available integrations to view all integrations.
  3. Select the PostgreSQL integration.
  4. Provide the following configuration information:
  • Integration ID - Choose an ID that is brief and helps identify the integration.
  • Database endpoint - The database host including the port number.
  • PostgreSQL username
  • PostgreSQL password - To keep it private, store your password in Squid Secrets.
  • Schema - The name of the schema to connect to - If none is provided, the default public schema is used.
  • Database name - The name of the database to connect to.
  • SSL configuration (if needed)

Once you've entered the connection information, click Test connection to confirm that the connection is configured properly.

PostgreSQL integration

Securing your database

By default, security rules are required, and in a production environment, it's essential to never allow access to the integration without them. Learn more about securing your database data in the security rules documentation.

The following table outlines the datatype mapping between PostgreSQL and Squid:

PostgreSQL TypeSquid Type
bigintnumber
bitstring
bit varyingstring
booleanboolean
byteastring
charstring
characterstring
character varyingstring
cidrstring
datedate
double precisionnumber
enumstring
inetstring
integerinteger
intervalstring
jsonmap or array
jsonbmap or array
macaddrstring
macaddr8string
mediumintinteger
moneynumber
numericnumber
realnumber
smallintinteger
textstring
timestring
time with time zonestring
time without time zonestring
timestampdate
timestamp with time zonedate
timestamp without time zonedate
tinyintinteger
uuidstring
varcharstring

To learn how to work with PostgreSQL data in Squid, view the Client SDK documentation.