Set up credentials
Adapt connects to PostgreSQL using a single connection string in the standard format:1
Gather your connection details
Collect the values for your database:
- Host: the server address (for example
db.example.comor an IP) - Port: the PostgreSQL port,
5432by default - Database name: the database you want to query
- User and password: the credentials Adapt will authenticate with
2
Create a read-only role (recommended)
For safety, create a dedicated read-only role and grant it
SELECT on the
schemas you want Adapt to access, rather than using a superuser account.3
Assemble the connection string
Combine the values into one string:If your server requires SSL, append
?sslmode=require to the end. Any
special characters in the password must be percent-encoded.If your database is behind a firewall or private network, make sure the host is
reachable and that any required IP addresses are allowlisted.
Connect to Adapt
1
Open Integrations
In Adapt, go to Settings > Integrations.
2
Find PostgreSQL
Search for PostgreSQL and select it from the catalog.
3
Start the connection
Click Connect to open the connection form.
4
Add your credentials
Enter the values you gathered above, then click Add connection:
You can rename the connection and choose whether it is shared with your
organization or kept personal to you.
5
Test the connection
Ask Adapt to list your tables or query your data.
Security
- Credentials are encrypted at rest with AES-256
- Use a dedicated read-only role with
SELECT-only privileges - Connect over SSL (
sslmode=require) whenever your server supports it - Restrict network access to your database and allowlist only trusted addresses
- Never share your connection string publicly or commit it to source control