Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.pipeshub.com/llms.txt

Use this file to discover all available pages before exploring further.

PostgreSQL Logo

PostgreSQL

Schema, table, and row sync from a PostgreSQL database

ReadyDatabase

Overview

The PostgreSQL connector indexes schemas, tables, and row data from a PostgreSQL database into PipesHub so your AI assistant can search across structured data alongside your other knowledge sources.

What Gets Synced

Content TypeDetails
SchemasAll schemas selected by the Schemas filter
TablesTable names, columns, data types, primary and foreign keys
Schema metadataCREATE TABLE statements and relationships between tables
Row dataRow contents from selected tables, capped per table by the Max rows filter

Configuration Guide

If you already have a PostgreSQL server, skip this step.

Install PostgreSQL

Download the installer from the PostgreSQL Downloads page.Verify the install:
psql --version
If psql is not recognized, add the bin directory to PATH:
$env:PATH += ";C:\Program Files\PostgreSQL\16\bin"

Install pgAdmin

Download the installer from the pgAdmin Downloads page.

Set up a local server and database

  1. Open pgAdmin.
  2. Register a new server:
    • Right-click Servers > Register > Server
    • General tab — Name: Local PostgreSQL
    • Connection tab — Host: localhost, Port: 5432, Username: postgres, Password: the one you set during PostgreSQL install
    • Save
  3. Create the database:
    • Expand the server > right-click Databases > Create > Database
    • Name it bird_mini_dev
    • Save

Create a user for the connector

Create a dedicated read-only role for PipesHub. Run these as a superuser (e.g. postgres) against the target database:
CREATE USER pipeshub_user WITH PASSWORD 'a_strong_password';
GRANT CONNECT ON DATABASE bird_mini_dev TO pipeshub_user;
GRANT USAGE ON SCHEMA public TO pipeshub_user;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO pipeshub_user;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO pipeshub_user;
The connector also reads schema metadata from information_schema and pg_catalog, which are available to any authenticated user by default.
Replace pipeshub_user and a_strong_password with your own values, and repeat the USAGE/SELECT/ALTER DEFAULT PRIVILEGES grants for each schema you plan to sync.
If you already have data, skip this step.
  1. Download the dataset from birdsql/bird_mini_dev on Hugging Face.
  2. Click Download BIRD Mini-Dev Complete Package and extract the zip.
  3. Locate BIRD_dev.sql in minidev_0703/minidev/MINIDEV_postgresql.
  4. Load it with psql:
Windows (use double quotes and Windows paths):
psql -U postgres -d bird_mini_dev -f "D:\Downloads\BIRD_dev.sql"
If psql is not on PATH, use the full path:
"C:\Program Files\PostgreSQL\16\bin\psql.exe" -U postgres -d bird_mini_dev -f "D:\Downloads\BIRD_dev.sql"
macOS / Linux:
psql -U postgres -d bird_mini_dev -f ~/Downloads/BIRD_dev.sql
The dataset includes Formula 1 tables: circuits, constructors, constructorresults, constructorstandings, drivers, laptimes, driverstandings, pitstops, qualifying, races, results, seasons, status. Sample queries are on the dataset page.
  1. In PipesHub, open Connector Settings.
  2. In the Available tab, find the PostgreSQL card and click Configure.
PostgreSQL connector card in Available connectors
  1. Choose how you want to authenticate.

Option 1: Basic Auth

FieldExample
Hostlocalhost
Port5432
Databasebird_mini_dev
Userpostgres
Passwordyour password

Option 2: Connection String

Use a single PostgreSQL connection string:
postgresql://postgres:your_password@localhost:5432/bird_mini_dev
If your password contains special characters, URL-encode them:
@ -> %40
: -> %3A
/ -> %2F
% -> %25
# -> %23
Example: p@ss:word becomes p%40ss%3Aword
postgresql://postgres:p%40ss%3Aword@localhost:5432/bird_mini_dev
PostgreSQL connector auth configuration
Sync filters control what is pulled from PostgreSQL. Anything excluded by a filter is never downloaded.
PostgreSQL sync filters
FilterDescriptionDefault
SchemasPick the schemas to sync (e.g. public). Leave empty to sync all schemas.All schemas
TablesPick the tables to sync (e.g. public.account). Leave empty to sync all tables in the selected schemas.All tables
Max rows per tableMaximum number of rows to fetch from each table.1000
Index tablesWhen enabled, table content is indexed for AI search. When disabled, only schema metadata is indexed.Enabled
Schemas and tables are dropdowns populated from your database after the credentials are saved — pick from the list rather than typing names by hand.
  1. Pick Scheduled or Manual sync.
  2. If scheduled, set the Sync interval (default: 60 minutes).
  3. Click Save to enable the connector.
PostgreSQL sync settings
The connector verifies the connection, then runs the initial sync. Watch the Indexing Progress to track completion.
PostgreSQL connector active and synced

Example Use Cases

After syncing the BIRD Mini Dev Formula 1 tables, you can ask your assistant questions like:
  • “Which constructor has the most championships?”
  • “Show me the fastest pit stop times across the 2008 season.”
  • “List the top 5 drivers by total points across all seasons.”
The connector exposes both schema (so the assistant knows which tables and columns exist) and row data (so it can return actual results).

FAQ

For read-only sync, grant USAGE on the schemas and SELECT on the tables you want to sync:
GRANT USAGE ON SCHEMA public TO pipeshub_user;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO pipeshub_user;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO pipeshub_user;
The connector also reads schema metadata from information_schema and pg_catalog, which are available to any authenticated user by default.
Yes. Use the public host and port. Make sure:
  • pg_hba.conf allows connections from the PipesHub deployment IP range.
  • The PostgreSQL service is listening on a reachable interface (listen_addresses in postgresql.conf).
  • Any firewall or security group allows traffic on the chosen port (default 5432).
URL-encode the special characters in the password. Common replacements:
@ -> %40
: -> %3A
/ -> %2F
% -> %25
# -> %23
So p@ss:word becomes p%40ss%3Aword in the connection string.
Use Max rows per table in sync filters to cap how many rows are fetched per table, narrow the Schemas and Tables filters to just what you need, and disable Index tables if you only want schema metadata in search.
Yes. Select multiple schemas in the Schemas filter, then pick fully-qualified table names (e.g. public.account, analytics.events) in the Tables filter.