PostgreSQL Integration

Connect PostgreSQL for read-only questions about selected database tables in Brief chat.

Last updated: October 20, 2026

Connect a PostgreSQL database so you can ask Brief about your data in chat. Brief can list accessible tables, describe their columns, and run read-only queries for counts, trends, and other analysis. It queries the database when needed; there is no initial data import to wait for.

Prepare the database

Use a dedicated database user with read-only permissions. A read replica or analytics database is a good choice if you want to keep analysis queries away from application traffic. Your host must be publicly reachable from Brief: local, private-network, and link-local addresses are refused. Make sure the host is set up for Verify Full SSL certificate validation.

Connect PostgreSQL

  1. Open Integrations, find PostgreSQL, and select Connect.
  2. Enter Connection Name, Host, Port, Database, Username, and Password. The default port is 5432.
  3. Set SSL Mode to Verify Full, then select Test Connection & Continue. The save step requires this mode even though the form displays other SSL choices.
  4. Review the tables Brief found. All discovered tables start selected; deselect any you do not want Brief to query. Select Connect Database.

The last step requires at least one selected table when tables were found. If no tables were found, the screen says the database will connect without table restrictions. Check the user's database permissions before proceeding in that case.

Ask questions and control access

Try “How many orders were created last week?” or “Which products had the most purchases this month?” Brief can inspect the schema before composing a query. Answers depend on the tables and records your database user can read.

After you connect, Brief tries to create a PostgreSQL usage skill to guide its database questions. See Skills to learn how Brief uses these guides.

Brief accepts SELECT, WITH queries, and EXPLAIN without ANALYZE. It checks query structure and selected-table access, blocks restricted functions and statements, and enables database read-only mode. Queries are limited to 4,000 characters, with a 10-second statement timeout. Results are capped at 50 rows and 8,000 characters of serialized data. Ask a narrower question if a result is truncated.

Each query opens a short-lived database connection. The password is encrypted when the connection is saved. The table selection applies when tables were discovered; a connection made with no discovered tables has no selection-based restriction, so the database user's own permissions matter especially there.

Manage the connection

A workspace member can connect a new database. To change accessible tables or credentials on an existing connection, ask a workspace admin to select Disconnect on its database card in Integrations. Then connect the database again and choose the new tables. Disconnecting stops Brief from using that connection.

Common problems

  • Connection test fails: Recheck the host, port, database, username, password, network access, and SSL certificate. Use a publicly reachable hostname rather than localhost or a private address.
  • Connection saves fail after a successful test: Confirm SSL Mode is Verify Full and the database certificate validates for the hostname.
  • A table is inaccessible: The table may not have been selected, or the database user may lack permission. Ask a workspace admin to disconnect the database, then reconnect to change the table selection.
  • Queries time out or results are cut short: Ask for a smaller date range, fewer columns, or a grouped result. Consider a read replica for expensive analysis.

See Supabase for Supabase-managed projects or all integrations for other data sources.