Skip to main content

Overview

This guide walks you through connecting TextQL to your PostgreSQL database. You’ll need connection credentials from your PostgreSQL account to complete the setup.

Prerequisites

To connect TextQL with your PostgreSQL database, you will need:
  • Host URL and Port (default: 5432)
  • Username and Password
  • Database name (default: postgres)
  • Schemas (optional, if you want to specify specific schemas)

Finding Your Connection Details

Connection String Format

Most PostgreSQL providers display the connection string in this format:
postgresql://username:password@host:port/database

Example Connection String Breakdown

postgresql://username:[email protected]:5432/mydb
                ↑       ↑            ↑        ↑    ↑
           username   password     host     port  database
From this connection string, you can extract:
  • Host URL: db.example.com
  • Port: 5432
  • Username: username
  • Password: pass123
  • Database: mydb

Creating the Connector in TextQL

Step 1: Navigate to Connectors Page

  1. Go to the TextQL Connectors Page
  2. Click New Connector

Step 2: Select PostgreSQL

Select Postgres from the available connectors to open the configuration form.

Step 3: Enter Connection Details

The form requires the following information:
FieldDescriptionExample
Connector NameA descriptive name to identify this connectionMy PostgreSQL Database
Host URLThe endpoint URL of your PostgreSQL databasedb.example.com
PortThe port number for your connection5432
UsernameYour PostgreSQL usernamepostgres
PasswordYour database password••••••••
DatabaseThe name of the database to connect topostgres
Schemas(Optional) Specific schemas to includepublic, analytics

Step 4: Test and Create

  1. Click Test Connection to verify your credentials and network access
  2. Once the test succeeds, click Create Connector to save the connection

Troubleshooting

Connection Fails

Verify the following:
  • Connection credentials are correct
  • Host URL and port are accurate
  • Database name is spelled correctly
  • PostgreSQL server is running and accessible
Having trouble connecting? See the Network Configuration Guide for firewall and IP whitelisting setup.

Authentication Errors

Check:
  • Username and password are correct
  • User has appropriate permissions
  • Password doesn’t contain special characters that need escaping

Timeout Errors

Possible causes:
  • Firewall blocking connection
  • Incorrect host URL or port
  • Database server not responding
  • Network connectivity issues

What’s Next

Once your PostgreSQL connector is set up, you can:
  • Ask Ana natural language questions about your data
  • Generate SQL queries and visualizations
  • Create reports and dashboards
  • Share insights with your team