# Triagic + PostgreSQL: ticket investigations over your database, read-only

> PostgreSQL in Triagic: Browse schemas and run read-only SQL against a Postgres database. Read-only, with a credential you configure.

Source: https://triagic.com/integrations/postgres

## What you can ask

- Look up account acme-labs in PostgreSQL and tell me why their last export failed
- In PostgreSQL, how many orders for org 8412 are stuck in a non-terminal state right now?
- Which rows in PostgreSQL changed for user 51930 in the last 24 hours?
- Compare the PostgreSQL record for invoice INV-2291 with what the customer says they see
- Does PostgreSQL show the same plan for this account as the billing system does?

## What the agent can do

- `list_schemas`
- `list_tables`
- `describe_table`
- `query`

## Connect in three steps

1. **Mint a read-only credential in PostgreSQL.** Create a dedicated user or token that can only read. Triagic writes this server: query accepts one SELECT-style statement over a protocol that refuses a second, inside a read-only transaction that is always rolled back. Use a SELECT-only role too.
2. **Add it in the Triagic portal.** Integrations, then Add shared data source, then PostgreSQL. Fill in: Connection URL (required): Certificates live in the URL: `sslrootcert=/path/ca.pem` for a private CA, and `sslcert=` plus `sslkey=` for a client certificate. Paths are on the machine running Triagic and are read from disk at connect time. Note that this driver treats `sslmode=prefer`, `require` and `verify-ca` as aliases for `verify-full`, which is stricter than libpq, so a URL copied from an RDS console can fail here where it worked elsewhere. Add `uselibpqcompat=true` to get libpq's meanings back.
3. **Let a desktop pick it up.** Saving validates the shape of what you typed. The first desktop app to sync starts PostgreSQL locally and reports running or degraded with the error text.

Setup reference: https://triagic.com/docs/integrations/databases#postgresql

## Read-only, by construction

Triagic writes this server: query accepts one SELECT-style statement over a protocol that refuses a second, inside a read-only transaction that is always rolled back. Use a SELECT-only role too.

## FAQ

**Can Triagic change anything in PostgreSQL?**
No. Triagic writes this server: query accepts one SELECT-style statement over a protocol that refuses a second, inside a read-only transaction that is always rolled back. Use a SELECT-only role too. Give it a read-only credential as well, so the guarantee does not rest on one layer.

**What do I need to connect PostgreSQL?**
Connection URL. The desktop app on a member's machine starts the connection; the portal never holds a live process.

**Does PostgreSQL cost extra?**
No. Every connector is included in the seat price. Start a 14-day trial without a card.

## Related integrations

- [MongoDB](https://triagic.com/integrations/mongodb)
- [MySQL](https://triagic.com/integrations/mysql)
- [Redis](https://triagic.com/integrations/redis)
- [ClickHouse](https://triagic.com/integrations/clickhouse)
