PostgreSQL · Natural language to code-validated SQL

Connect Postgres to Claude read-only. Your data stays where it is.

  • Six fields: host, port, database, schema, user, password
  • Saved queries compile into SKILL.md for Claude Code and Codex

Connecting Postgres to Claude takes six fields: host, port, database, schema, user, and password. Chion turns a plain-English question into a read-only SELECT, passes it through the application validators, executes it against your database, and shows the executed query beneath the chart. A Postgres MCP server hands Claude live tools against that database. A compiled skill carries the procedure and the text of a query someone on your team already saved and reviewed in Studio. The two cover different halves of the job: live access on one side, reviewed query knowledge on the other. Provider-specific steps live on the Neon, Supabase, Amazon RDS, Google Cloud SQL, and Azure pages. Jump to how SQL generation works.

Chion turns your PostgreSQL database into an analyst your team can question: connect read-only, ask in plain English, and save a query you have reviewed so the SQL skills generator can compile it. Your database becomes a question box the whole team can use, with no SQL to write and no write access granted. Credentials are wrapped in an AES-256-GCM vault, every query runs as a read-only SELECT capped at 1,000 rows, and the row-level security on the role you provide is honored on every call. It is the AI SQL workforce for teams on managed Postgres: connect in six fields. Point it at a read replica; your primary stays untouched. A query you saved and reviewed compiles into a portable SQL skill that runs in Claude Code and Codex.

How Chion connects to PostgreSQL

Five steps from role creation to interactive charts.

  1. 1

    Create a read-only Postgres role

    In your database, grant only what Chion needs:

    CREATE ROLE chion_read LOGIN PASSWORD '<strong-password>';
    GRANT CONNECT ON DATABASE <dbname> TO chion_read;
    GRANT USAGE  ON SCHEMA public       TO chion_read;
    GRANT SELECT ON ALL TABLES IN SCHEMA public TO chion_read;
    ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO chion_read;
  2. 2

    Enter the six connection fields

    From your provider's dashboard, collect Host, Port (5432 for direct connections, 6543 for the Supabase transaction pooler, 6432 for the Azure PgBouncer pooler), Database, Schema (default public), User, and Password.

  3. 3

    Paste into Chion

    Open Chion, click Connect PostgreSQL, paste the six fields. Credentials are wrapped in an AES-256-GCM envelope, never logged, never shown to the language model, and only unsealed inside the edge function for the duration of one query.

  4. 4

    Chion profiles your schema

    Chion profiles table names, column types, and cardinality, and samples column values to learn your nomenclature. Those samples reach the model in the prompts that match your wording to your columns, except for columns classed as PII.

  5. 5

    Ask in plain English

    Type a question. Chion generates SQL, passes it through the multi-stage validator (L1 read-only SELECT check, L2 mode-based validator), executes it read-only with a capped LIMIT of 1,000 rows or 12,000 cells, and renders the result as an interactive D3.js chart. See how conversational analytics works.

Find your credentials

Select your PostgreSQL provider for step-by-step instructions.

FieldWhere to FindDefault
Server (Endpoint)Connectivity & security tab → Endpoint<instance>.<id>.<region>.rds.amazonaws.com
PortSame tab, next to Endpoint5432
DatabaseConfiguration tab → DB namepostgres (or what you set at creation)
SchemaNot in console; default is publicpublic
UserConfiguration tab → Master usernamepostgres (or what you set)
PasswordSet at instance creation. Modify → change Master password to reset(not retrievable)

Quick steps

  1. 1.Log in at console.aws.amazon.com/rds
  2. 2.Click Databases in the left sidebar
  3. 3.Click your PostgreSQL instance name
  4. 4.Connectivity & security tab → copy the Endpoint and Port
  5. 5.Configuration tab → note the DB name and Master username
  6. 6.Password is what you entered during creation (use Modify to reset if needed)
FieldWhere to FindDefault
Server (Host)Overview page → Server name<server>.postgres.database.azure.com
PortOverview or Connection strings page5432
DatabaseCreated by default. Check via Connection strings or psqlpostgres
SchemaNot in portal; default is publicpublic
UserOverview page → Admin usernameWhat you set at creation
PasswordSet at creation. Reset via Settings → Reset password(not retrievable)

Quick steps

  1. 1.Log in at portal.azure.com
  2. 2.Search for "Azure Database for PostgreSQL servers"
  3. 3.Click your server name
  4. 4.On the Overview page: copy the Server name (this is your host) and note the Admin username
  5. 5.Click Connection strings in the left sidebar for pre-built connection strings
  6. 6.Password is what you set during creation; reset via Settings → Reset password if needed

Azure Flexible Server uses port 5432 for direct connections and 6432 for the built-in PgBouncer pooler.

FieldWhere to FindDefault
Server (Host)Overview → Connect to this instance → Public/Private IPIP address (e.g., 34.x.x.x)
PortNot prominently displayed; always default5432
DatabaseDatabases tab in left sidebarpostgres
SchemaNot in console; default is publicpublic
UserUsers tab in left sidebarpostgres
PasswordUsers tab → three-dot menu → Change passwordSet at creation or via Users tab

Quick steps

  1. 1.Log in at console.cloud.google.com
  2. 2.Navigate to SQL from the left sidebar
  3. 3.Click your PostgreSQL instance name
  4. 4.Overview page → under "Connect to this instance," copy the Public IP address
  5. 5.Click Databases in the left sidebar to see available databases
  6. 6.Click Users to see usernames; use the three-dot menu to change/reset a password
  7. 7.Port is always 5432

Google recommends using the Cloud SQL Auth Proxy for production connections. For Chion, direct IP + SSL works for initial setup.

FieldWhere to FindDefault
Server (Host)Connect modal → displayed in connection stringep-<name>-<id>.us-east-2.aws.neon.tech
PortConnect modal5432
DatabaseConnect modal · selectable dropdownneondb
SchemaNot in UI; default is publicpublic
User (Role)Connect modal · selectable dropdownneondb_owner
PasswordShown in the connection string in the Connect modal(always visible in modal)

Quick steps

  1. 1.Log in at console.neon.tech
  2. 2.Select your project
  3. 3.Click the Connect button on the Project Dashboard
  4. 4.The "Connect to your database" modal opens
  5. 5.Select your Branch, Compute, Database, and Role from dropdowns
  6. 6.All connection parameters including password are displayed in the connection string
  7. 7.Toggle Connection pooling on/off to switch between pooled and direct connections

Password is always visible in the Connect modal; no need to reset.

FieldWhere to FindDefault
Server (Host)Connect → View parameters under "Direct connection"db.<project-ref>.supabase.co
PortSame panel · Direct: 5432, Transaction pooler: 65435432
DatabaseSame panelpostgres
SchemaNot shown in UI; default is publicpublic
UserSame panelpostgres
PasswordSet at project creation. Reset in Settings → Database(not displayed after creation)

Quick steps

  1. 1.Log in at supabase.com/dashboard
  2. 2.Select your project
  3. 3.Click the Connect button at the top of the page
  4. 4.Click "View parameters" under the Direct connection string
  5. 5.All fields (host, port, database, user) are displayed individually
  6. 6.Password must be the one you set at project creation (or reset it in Settings → Database)

Settings that work on every provider.

Standard PostgreSQL connection parameters.

Port5432
Databasepostgres
Schemapublic
SSL Moderequire (recommended for all cloud providers)

Read-only is enforced in code.

Architectural constraints, not configuration options.

Most text-to-SQL tools accept a database connection and generate queries. Chion runs each generated query through a multi-stage SQL validator (L1 enforces read-only SELECT at the syntax level, L2 applies mode-based restrictions) before execution. Credentials never leave the AES-256-GCM vault except inside the edge function for a single query's duration. Result sets are capped at 1,000 rows or 12,000 cells. Row-level security applies through the role you supply: its policies decide which rows come back. The model receives your table and column names, the rows your query returned for the narrative, and sampled column values. These are architectural constraints, not configuration options.

Read-only SELECT. Credentials in an AES-256-GCM vault. Results capped at 1,000 rows. Each executed query leaves one audit row: a query hash, the row count, and the mode. Never the SQL text. The write is fire-and-forget, so it never blocks the query.

A Postgres MCP server for Claude covers the other half of the job. It hands Claude live tools against the database and full control of the tooling layer, and it is free. What you wire yourself is only as safe as the role you grant it, because the query validator, the credential vault, and the result cap are yours to write. Chion ships those constraints by default. A query someone saves and reviews compiles into a portable skill you run in Claude Code or Codex, which is the knowledge an MCP connection alone does not carry.

How this compares to a Postgres MCP server

Where each one is the shorter path.

A Postgres MCP server runs on your machine and gives Claude Code a tool that executes SQL, so you own the process, the credentials file, and whatever the granted role allows. Chion holds the connection server-side under the read-only role you supply, code-validates every SELECT before execution, caps the result, and prints the statement that ran. Use the MCP server when you want the database local to your terminal. Use Chion when the executed SQL and the saved query library need to outlive the session.

Copy the connection string for your provider.

Where each field lives in a standard Postgres connection string.

Any other PostgreSQL host

postgres://<user>:<password>@<host>:<port>/<database>?sslmode=require

Neon

postgres://neondb_owner:REDACTED@ep-cool-forest-123456.us-east-2.aws.neon.tech/neondb?sslmode=require

Supabase (direct connection, port 5432)

postgres://postgres:REDACTED@db.abcdefghijklmnop.supabase.co:5432/postgres?sslmode=require

Supabase (transaction pooler, port 6543)

postgres://postgres.abcdefghijklmnop:REDACTED@aws-0-us-east-1.pooler.supabase.com:6543/postgres?sslmode=require

Amazon RDS for PostgreSQL

postgres://postgres:REDACTED@my-db.c9akciq32.us-east-1.rds.amazonaws.com:5432/postgres?sslmode=require

All passwords above are redacted. Chion seals your password in an AES-256-GCM envelope; it is never logged, never shown in the UI after save, and never sent to the language model.

What Chion runs to read your schema.

List all available schemas after connecting.

SELECT schema_name 
FROM information_schema.schemata 
WHERE schema_name NOT IN ('pg_catalog', 'information_schema', 'pg_toast')
ORDER BY schema_name;

Troubleshooting common PostgreSQL connection errors

Solutions for the most frequent connection issues.

ERROR: permission denied for relation X

Your role can CONNECT to the database but not read the table. Grant SELECT on the specific relation and set default privileges so newly-created tables are readable too:

GRANT SELECT ON TABLE schema.relation TO chion_read;
ALTER DEFAULT PRIVILEGES IN SCHEMA schema
  GRANT SELECT ON TABLES TO chion_read;

SSL connection required or no pg_hba.conf entry for host

Chion connects with sslmode=require. On managed Postgres (Neon, Supabase, RDS, GCP, Azure), SSL is always enabled; if you still see this error, check your IP allowlist.

Connection timeout or connection refused on port 5432

The port is not reachable. Check your firewall or cloud security group allows inbound connections on 5432 from the public internet. On AWS RDS, edit the security group associated with your DB instance. On GCP Cloud SQL, add an authorized network.

Pooler port mismatch

If you see connection errors with a pooled endpoint, check the port. Supabase transaction pooler is port 6543. Azure PostgreSQL Flexible Server's built-in PgBouncer is port 6432. Direct PostgreSQL is always 5432.

database "X" does not exist

You entered the wrong database name. Default names vary by provider: postgres on RDS, Azure, GCP, and Supabase; neondb on Neon. Check your provider's dashboard or run \l inside psql to list databases.

FATAL: too many connections for role

Your role or database has hit the connection limit. Chion uses a small connection pool, so if you see this error it is usually another process. For Neon, check the compute's max connections setting. For RDS, check the max_connections parameter. For Supabase, switch to the transaction pooler on port 6543 instead of the direct 5432 endpoint.

Read your provider's own docs.

Authoritative references for each managed PostgreSQL service. All open in a new tab.

Your credentials are encrypted

All connection credentials are encrypted with AES-256-GCM and stored in an isolated vault. Read-only by design: every generated statement is rejected in code unless it is a single read-only SELECT. PostgreSQL's row-level security policies apply to every query: Chion connects via your read-only role; your RLS policies decide what that role can see. The model receives your table and column names, the rows your query returned for the narrative, and sampled column values.

Read our security model

Frequently asked questions

Is it safe to let an AI tool query my production database?

Read-only removes the write risk, not every risk. Every statement is a SELECT, rejected in code by the L1 validator if it is not, and results are capped at 1,000 rows or 12,000 cells. Read-only does not stop an expensive scan, a sensitive read the connected role can reach, or prompt injection. RLS applies as the policies attached to the role you supply. The model receives your table and column names, the rows your query returned for the narrative, and sampled column values.
Visit the Trust Center →

What database permissions does an AI SQL tool need?

A dedicated read-only PostgreSQL role with CONNECT, USAGE, and SELECT on the schemas you want analyzed. No write privileges, no superuser, no replication role: Chion only issues SELECTs and the L1 validator enforces that in code, so broader privileges would grant capabilities Chion cannot use. Grant only what you want Chion to see; the Row-Level Security policies attached to the role you supply are honored on every query.
PostgreSQL setup guide →

Can AI text-to-SQL point at a PostgreSQL read replica?

Yes. Replicas are the natural target. Chion only issues read-only SELECTs, so a replica endpoint fits: no write path, and the scan load stays off the primary. Paste the replica's host into the connection string and the semantic layer builds against the replica's schema identically to the primary. The same applies to a Cloud SQL read replica.

Does AI text-to-SQL work through PgBouncer transaction pooling?

Yes. Chion direct-connects through PgBouncer in transaction pooling mode. Every query is a short-lived read-only SELECT, so there's no session-state binding for the pooler to break. For Supabase, use the Supavisor transaction pooler at port 6543. For Azure Flexible Server, use the built-in PgBouncer on port 6432. Deterministic execution, not ad-hoc connection churn.

Which managed PostgreSQL hosts and versions does AI text-to-SQL support?

Chion direct-connects to Amazon RDS (including Aurora PostgreSQL-Compatible), Azure Database for PostgreSQL (Flexible and Single Server), Google Cloud SQL for PostgreSQL, Neon, and Supabase. Self-hosted PostgreSQL reachable from Chion's egress works too. PostgreSQL 12 through 17 is supported with no server-side extensions required; standard tables, views, and materialized views are profiled into the semantic layer on connect, and PG 12+ unlocks the CTE inlining the WITH-clause queries rely on. The same two-layer validation runs identically across every host.

Is an AI SQL tool safer than a DIY n8n or GPT-to-SQL pipeline?

Yes, because the safety lives in code, not in the prompt. A DIY n8n or GPT-to-SQL pipeline sends model-generated SQL straight to your database, so an INSERT, UPDATE, or DELETE runs if the prompt drifts. Chion routes every query through an L1 read-only SELECT check and an L2 validator that reject anything but a read-only SELECT, caps results at 1,000 rows / 12,000 cells, keeps credentials in an AES-256-GCM vault, and applies the row-level security policies attached to the role you supply. The model receives your table and column names, the rows your query returned for the narrative, and sampled column values.

Ready to connect?

Open Chion, enter your credentials, and start asking questions in plain English.

    PostgreSQL · Natural language to code-validated SQL

    Connect Postgres to Claude read-only. Your data stays where it is.

    • Six fields: host, port, database, schema, user, password
    • Saved queries compile into SKILL.md for Claude Code and Codex

    Connecting Postgres to Claude takes six fields: host, port, database, schema, user, and password. Chion turns a plain-English question into a read-only SELECT, passes it through the application validators, executes it against your database, and shows the executed query beneath the chart. A Postgres MCP server hands Claude live tools against that database. A compiled skill carries the procedure and the text of a query someone on your team already saved and reviewed in Studio. The two cover different halves of the job: live access on one side, reviewed query knowledge on the other. Provider-specific steps live on the Neon, Supabase, Amazon RDS, Google Cloud SQL, and Azure pages. Jump to how SQL generation works.

    Chion turns your PostgreSQL database into an analyst your team can question: connect read-only, ask in plain English, and save a query you have reviewed so the SQL skills generator can compile it. Your database becomes a question box the whole team can use, with no SQL to write and no write access granted. Credentials are wrapped in an AES-256-GCM vault, every query runs as a read-only SELECT capped at 1,000 rows, and the row-level security on the role you provide is honored on every call. It is the AI SQL workforce for teams on managed Postgres: connect in six fields. Point it at a read replica; your primary stays untouched. A query you saved and reviewed compiles into a portable SQL skill that runs in Claude Code and Codex.

    How Chion connects to PostgreSQL

    Five steps from role creation to interactive charts.

    1. 1

      Create a read-only Postgres role

      In your database, grant only what Chion needs:

      CREATE ROLE chion_read LOGIN PASSWORD '<strong-password>';
      GRANT CONNECT ON DATABASE <dbname> TO chion_read;
      GRANT USAGE  ON SCHEMA public       TO chion_read;
      GRANT SELECT ON ALL TABLES IN SCHEMA public TO chion_read;
      ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO chion_read;
    2. 2

      Enter the six connection fields

      From your provider's dashboard, collect Host, Port (5432 for direct connections, 6543 for the Supabase transaction pooler, 6432 for the Azure PgBouncer pooler), Database, Schema (default public), User, and Password.

    3. 3

      Paste into Chion

      Open Chion, click Connect PostgreSQL, paste the six fields. Credentials are wrapped in an AES-256-GCM envelope, never logged, never shown to the language model, and only unsealed inside the edge function for the duration of one query.

    4. 4

      Chion profiles your schema

      Chion profiles table names, column types, and cardinality, and samples column values to learn your nomenclature. Those samples reach the model in the prompts that match your wording to your columns, except for columns classed as PII.

    5. 5

      Ask in plain English

      Type a question. Chion generates SQL, passes it through the multi-stage validator (L1 read-only SELECT check, L2 mode-based validator), executes it read-only with a capped LIMIT of 1,000 rows or 12,000 cells, and renders the result as an interactive D3.js chart. See how conversational analytics works.

    Find your credentials

    Select your PostgreSQL provider for step-by-step instructions.

    FieldWhere to FindDefault
    Server (Endpoint)Connectivity & security tab → Endpoint<instance>.<id>.<region>.rds.amazonaws.com
    PortSame tab, next to Endpoint5432
    DatabaseConfiguration tab → DB namepostgres (or what you set at creation)
    SchemaNot in console; default is publicpublic
    UserConfiguration tab → Master usernamepostgres (or what you set)
    PasswordSet at instance creation. Modify → change Master password to reset(not retrievable)

    Quick steps

    1. 1.Log in at console.aws.amazon.com/rds
    2. 2.Click Databases in the left sidebar
    3. 3.Click your PostgreSQL instance name
    4. 4.Connectivity & security tab → copy the Endpoint and Port
    5. 5.Configuration tab → note the DB name and Master username
    6. 6.Password is what you entered during creation (use Modify to reset if needed)
    FieldWhere to FindDefault
    Server (Host)Overview page → Server name<server>.postgres.database.azure.com
    PortOverview or Connection strings page5432
    DatabaseCreated by default. Check via Connection strings or psqlpostgres
    SchemaNot in portal; default is publicpublic
    UserOverview page → Admin usernameWhat you set at creation
    PasswordSet at creation. Reset via Settings → Reset password(not retrievable)

    Quick steps

    1. 1.Log in at portal.azure.com
    2. 2.Search for "Azure Database for PostgreSQL servers"
    3. 3.Click your server name
    4. 4.On the Overview page: copy the Server name (this is your host) and note the Admin username
    5. 5.Click Connection strings in the left sidebar for pre-built connection strings
    6. 6.Password is what you set during creation; reset via Settings → Reset password if needed

    Azure Flexible Server uses port 5432 for direct connections and 6432 for the built-in PgBouncer pooler.

    FieldWhere to FindDefault
    Server (Host)Overview → Connect to this instance → Public/Private IPIP address (e.g., 34.x.x.x)
    PortNot prominently displayed; always default5432
    DatabaseDatabases tab in left sidebarpostgres
    SchemaNot in console; default is publicpublic
    UserUsers tab in left sidebarpostgres
    PasswordUsers tab → three-dot menu → Change passwordSet at creation or via Users tab

    Quick steps

    1. 1.Log in at console.cloud.google.com
    2. 2.Navigate to SQL from the left sidebar
    3. 3.Click your PostgreSQL instance name
    4. 4.Overview page → under "Connect to this instance," copy the Public IP address
    5. 5.Click Databases in the left sidebar to see available databases
    6. 6.Click Users to see usernames; use the three-dot menu to change/reset a password
    7. 7.Port is always 5432

    Google recommends using the Cloud SQL Auth Proxy for production connections. For Chion, direct IP + SSL works for initial setup.

    FieldWhere to FindDefault
    Server (Host)Connect modal → displayed in connection stringep-<name>-<id>.us-east-2.aws.neon.tech
    PortConnect modal5432
    DatabaseConnect modal · selectable dropdownneondb
    SchemaNot in UI; default is publicpublic
    User (Role)Connect modal · selectable dropdownneondb_owner
    PasswordShown in the connection string in the Connect modal(always visible in modal)

    Quick steps

    1. 1.Log in at console.neon.tech
    2. 2.Select your project
    3. 3.Click the Connect button on the Project Dashboard
    4. 4.The "Connect to your database" modal opens
    5. 5.Select your Branch, Compute, Database, and Role from dropdowns
    6. 6.All connection parameters including password are displayed in the connection string
    7. 7.Toggle Connection pooling on/off to switch between pooled and direct connections

    Password is always visible in the Connect modal; no need to reset.

    FieldWhere to FindDefault
    Server (Host)Connect → View parameters under "Direct connection"db.<project-ref>.supabase.co
    PortSame panel · Direct: 5432, Transaction pooler: 65435432
    DatabaseSame panelpostgres
    SchemaNot shown in UI; default is publicpublic
    UserSame panelpostgres
    PasswordSet at project creation. Reset in Settings → Database(not displayed after creation)

    Quick steps

    1. 1.Log in at supabase.com/dashboard
    2. 2.Select your project
    3. 3.Click the Connect button at the top of the page
    4. 4.Click "View parameters" under the Direct connection string
    5. 5.All fields (host, port, database, user) are displayed individually
    6. 6.Password must be the one you set at project creation (or reset it in Settings → Database)

    Settings that work on every provider.

    Standard PostgreSQL connection parameters.

    Port5432
    Databasepostgres
    Schemapublic
    SSL Moderequire (recommended for all cloud providers)

    Read-only is enforced in code.

    Architectural constraints, not configuration options.

    Most text-to-SQL tools accept a database connection and generate queries. Chion runs each generated query through a multi-stage SQL validator (L1 enforces read-only SELECT at the syntax level, L2 applies mode-based restrictions) before execution. Credentials never leave the AES-256-GCM vault except inside the edge function for a single query's duration. Result sets are capped at 1,000 rows or 12,000 cells. Row-level security applies through the role you supply: its policies decide which rows come back. The model receives your table and column names, the rows your query returned for the narrative, and sampled column values. These are architectural constraints, not configuration options.

    Read-only SELECT. Credentials in an AES-256-GCM vault. Results capped at 1,000 rows. Each executed query leaves one audit row: a query hash, the row count, and the mode. Never the SQL text. The write is fire-and-forget, so it never blocks the query.

    A Postgres MCP server for Claude covers the other half of the job. It hands Claude live tools against the database and full control of the tooling layer, and it is free. What you wire yourself is only as safe as the role you grant it, because the query validator, the credential vault, and the result cap are yours to write. Chion ships those constraints by default. A query someone saves and reviews compiles into a portable skill you run in Claude Code or Codex, which is the knowledge an MCP connection alone does not carry.

    How this compares to a Postgres MCP server

    Where each one is the shorter path.

    A Postgres MCP server runs on your machine and gives Claude Code a tool that executes SQL, so you own the process, the credentials file, and whatever the granted role allows. Chion holds the connection server-side under the read-only role you supply, code-validates every SELECT before execution, caps the result, and prints the statement that ran. Use the MCP server when you want the database local to your terminal. Use Chion when the executed SQL and the saved query library need to outlive the session.

    Copy the connection string for your provider.

    Where each field lives in a standard Postgres connection string.

    Any other PostgreSQL host

    postgres://<user>:<password>@<host>:<port>/<database>?sslmode=require

    Neon

    postgres://neondb_owner:REDACTED@ep-cool-forest-123456.us-east-2.aws.neon.tech/neondb?sslmode=require

    Supabase (direct connection, port 5432)

    postgres://postgres:REDACTED@db.abcdefghijklmnop.supabase.co:5432/postgres?sslmode=require

    Supabase (transaction pooler, port 6543)

    postgres://postgres.abcdefghijklmnop:REDACTED@aws-0-us-east-1.pooler.supabase.com:6543/postgres?sslmode=require

    Amazon RDS for PostgreSQL

    postgres://postgres:REDACTED@my-db.c9akciq32.us-east-1.rds.amazonaws.com:5432/postgres?sslmode=require

    All passwords above are redacted. Chion seals your password in an AES-256-GCM envelope; it is never logged, never shown in the UI after save, and never sent to the language model.

    What Chion runs to read your schema.

    List all available schemas after connecting.

    SELECT schema_name 
    FROM information_schema.schemata 
    WHERE schema_name NOT IN ('pg_catalog', 'information_schema', 'pg_toast')
    ORDER BY schema_name;

    Troubleshooting common PostgreSQL connection errors

    Solutions for the most frequent connection issues.

    ERROR: permission denied for relation X

    Your role can CONNECT to the database but not read the table. Grant SELECT on the specific relation and set default privileges so newly-created tables are readable too:

    GRANT SELECT ON TABLE schema.relation TO chion_read;
    ALTER DEFAULT PRIVILEGES IN SCHEMA schema
      GRANT SELECT ON TABLES TO chion_read;

    SSL connection required or no pg_hba.conf entry for host

    Chion connects with sslmode=require. On managed Postgres (Neon, Supabase, RDS, GCP, Azure), SSL is always enabled; if you still see this error, check your IP allowlist.

    Connection timeout or connection refused on port 5432

    The port is not reachable. Check your firewall or cloud security group allows inbound connections on 5432 from the public internet. On AWS RDS, edit the security group associated with your DB instance. On GCP Cloud SQL, add an authorized network.

    Pooler port mismatch

    If you see connection errors with a pooled endpoint, check the port. Supabase transaction pooler is port 6543. Azure PostgreSQL Flexible Server's built-in PgBouncer is port 6432. Direct PostgreSQL is always 5432.

    database "X" does not exist

    You entered the wrong database name. Default names vary by provider: postgres on RDS, Azure, GCP, and Supabase; neondb on Neon. Check your provider's dashboard or run \l inside psql to list databases.

    FATAL: too many connections for role

    Your role or database has hit the connection limit. Chion uses a small connection pool, so if you see this error it is usually another process. For Neon, check the compute's max connections setting. For RDS, check the max_connections parameter. For Supabase, switch to the transaction pooler on port 6543 instead of the direct 5432 endpoint.

    Read your provider's own docs.

    Authoritative references for each managed PostgreSQL service. All open in a new tab.

    Your credentials are encrypted

    All connection credentials are encrypted with AES-256-GCM and stored in an isolated vault. Read-only by design: every generated statement is rejected in code unless it is a single read-only SELECT. PostgreSQL's row-level security policies apply to every query: Chion connects via your read-only role; your RLS policies decide what that role can see. The model receives your table and column names, the rows your query returned for the narrative, and sampled column values.

    Read our security model

    Frequently asked questions

    Is it safe to let an AI tool query my production database?

    Read-only removes the write risk, not every risk. Every statement is a SELECT, rejected in code by the L1 validator if it is not, and results are capped at 1,000 rows or 12,000 cells. Read-only does not stop an expensive scan, a sensitive read the connected role can reach, or prompt injection. RLS applies as the policies attached to the role you supply. The model receives your table and column names, the rows your query returned for the narrative, and sampled column values.
    Visit the Trust Center →

    What database permissions does an AI SQL tool need?

    A dedicated read-only PostgreSQL role with CONNECT, USAGE, and SELECT on the schemas you want analyzed. No write privileges, no superuser, no replication role: Chion only issues SELECTs and the L1 validator enforces that in code, so broader privileges would grant capabilities Chion cannot use. Grant only what you want Chion to see; the Row-Level Security policies attached to the role you supply are honored on every query.
    PostgreSQL setup guide →

    Can AI text-to-SQL point at a PostgreSQL read replica?

    Yes. Replicas are the natural target. Chion only issues read-only SELECTs, so a replica endpoint fits: no write path, and the scan load stays off the primary. Paste the replica's host into the connection string and the semantic layer builds against the replica's schema identically to the primary. The same applies to a Cloud SQL read replica.

    Does AI text-to-SQL work through PgBouncer transaction pooling?

    Yes. Chion direct-connects through PgBouncer in transaction pooling mode. Every query is a short-lived read-only SELECT, so there's no session-state binding for the pooler to break. For Supabase, use the Supavisor transaction pooler at port 6543. For Azure Flexible Server, use the built-in PgBouncer on port 6432. Deterministic execution, not ad-hoc connection churn.

    Which managed PostgreSQL hosts and versions does AI text-to-SQL support?

    Chion direct-connects to Amazon RDS (including Aurora PostgreSQL-Compatible), Azure Database for PostgreSQL (Flexible and Single Server), Google Cloud SQL for PostgreSQL, Neon, and Supabase. Self-hosted PostgreSQL reachable from Chion's egress works too. PostgreSQL 12 through 17 is supported with no server-side extensions required; standard tables, views, and materialized views are profiled into the semantic layer on connect, and PG 12+ unlocks the CTE inlining the WITH-clause queries rely on. The same two-layer validation runs identically across every host.

    Is an AI SQL tool safer than a DIY n8n or GPT-to-SQL pipeline?

    Yes, because the safety lives in code, not in the prompt. A DIY n8n or GPT-to-SQL pipeline sends model-generated SQL straight to your database, so an INSERT, UPDATE, or DELETE runs if the prompt drifts. Chion routes every query through an L1 read-only SELECT check and an L2 validator that reject anything but a read-only SELECT, caps results at 1,000 rows / 12,000 cells, keeps credentials in an AES-256-GCM vault, and applies the row-level security policies attached to the role you supply. The model receives your table and column names, the rows your query returned for the narrative, and sampled column values.

    Ready to connect?

    Open Chion, enter your credentials, and start asking questions in plain English.