CockroachDB is a distributed SQL database that’s wire-compatible with PostgreSQL. QueryBear connects using the Postgres protocol, giving your AI clients safe, read-only access through QueryBear’s security gateway.Documentation Index
Fetch the complete documentation index at: https://docs.querybear.com/llms.txt
Use this file to discover all available pages before exploring further.
Get your CockroachDB connection details
- Open the CockroachDB Cloud console.
- Select your cluster → Connect.
- Copy the connection string. It includes a host, port
26257, database, and SSL parameters.
options=--cluster=... parameter for Serverless) — keep that in the connection string.
Create a read-only role
Use the PostgreSQL read-only role SQL. CockroachDB supportsCREATE ROLE, GRANT SELECT, and ALTER DEFAULT PRIVILEGES with Postgres-compatible syntax.
Add the connection to QueryBear
In the QueryBear dashboard → Connections → New connection → PostgreSQL. Use the CockroachDB host, port26257, database, your querybear role, and SSL mode require (CockroachDB Cloud mandates TLS).
CockroachDB-specific notes
- Port 26257, not the Postgres default
5432. - TLS is mandatory on CockroachDB Cloud. QueryBear’s
requireSSL mode handles it. - Cluster routing: For Serverless clusters, keep the
options=--cluster=<name>parameter in your connection string. - Postgres-compatible, not identical: Most
SELECTqueries work unchanged. A few Postgres system catalogs differ; QueryBear’s schema introspection handles CockroachDB’s catalog.