NatureQuery for PostgreSQL
Ask your PostgreSQL database in plain English.
NatureQuery writes PostgreSQL for your question, runs it inside a read-only transaction, and gives you the answer as a table, a chart or a summary. When a number moves, the Analyst finds out why.
Any PostgreSQL server the internet can reach, such as Amazon RDS, Google Cloud SQL or Azure, plus Neon, Supabase, CockroachDB and Amazon Redshift, each with its own option.
Free plan: 50 AI questions a month. No card needed.
From a question
You ask in English. It writes PostgreSQL.
An example of the SQL it writes: PostgreSQL functions, your real table and column names, and the exact values your columns hold. The SQL is always shown, so you can check what was counted.
“Monthly revenue this year from completed orders”
SELECT date_trunc('month', order_date) AS month,
SUM(total_amount) AS revenue
FROM orders
WHERE status = 'completed'
AND order_date >= date_trunc('year', CURRENT_DATE)
GROUP BY 1
ORDER BY 1;What it reads
What NatureQuery reads from PostgreSQL.
- Tables
- The tables in the public schema, with their columns, types, primary keys and foreign keys, so joins follow the links your database already has.
- Enum values
- The allowed values of enum columns, so a filter says status = 'paid' instead of guessing.
- Views
- For the Analyst, the views and materialized views in public, with the SQL behind them, so its numbers follow the definitions your reports already use.
- Not your rows
- Writing a query needs only the structure. The few features that read result rows, such as the Analyst, are listed in the privacy policy.
- Checked first
- One statement at a time, reading commands only, and no functions that can change data or reach other servers.
- BEGIN READ ONLY
- Every query runs inside a read-only transaction, so PostgreSQL itself refuses any write.
- Time limit
- A statement_timeout of 30 seconds on every query, and up to 1,000 rows on screen.
- Encrypted
- The connection is encrypted, and new connections check the server's certificate.
Connect
Connected in a few minutes.
First, a user that can only read
For full certainty, connect with a user that can only read. Run this as the owner of your tables, with a password of your own:
CREATE ROLE naturequery_reader WITH LOGIN PASSWORD 'choose-a-strong-password';
GRANT CONNECT ON DATABASE your_database TO naturequery_reader;
GRANT USAGE ON SCHEMA public TO naturequery_reader;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO naturequery_reader;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO naturequery_reader;The last line lets this user read tables you create later, too.
- 01
Add a connection
On your NatureQuery dashboard, click Add connection under Connections and choose PostgreSQL, or Neon or Supabase if your database lives there.
- 02
Paste the address
Click Paste connection string and paste postgresql://user:password@host:5432/database, or fill in the host, port, database, user and password.
- 03
Test it
Click Test connection. If your provider signs its own certificates, as Amazon RDS does, turn on Trust this server's certificate. The connection stays encrypted.
- 04
Ask
Type a question in plain English, or ask the Analyst why a number changed.
The website connects only to public internet addresses. For a database on your own computer or office network, use NatureQuery Desktop for Windows.
NatureQuery Analyst
When a number moves, ask why.
The Analyst investigates your PostgreSQL database with read-only queries, names what drove a change and the day it started, and links every figure to its query. On Pro and Enterprise it also writes a morning briefing on your database.
How the Analyst worksQuestions
PostgreSQL and NatureQuery.
- Which PostgreSQL databases does NatureQuery work with?
- Any PostgreSQL server the internet can reach, such as Amazon RDS, Google Cloud SQL or Azure. Neon, Supabase, CockroachDB and Amazon Redshift each have their own option. For a database on your own computer or office network, use NatureQuery Desktop for Windows.
- Can NatureQuery change my PostgreSQL data?
- No. Every query is checked before it runs and then runs inside a read-only transaction, so PostgreSQL itself refuses any change. For full certainty, connect with a user that can only read.
- Does it read schemas other than public?
- Not yet. NatureQuery reads the tables in the public schema, and the Analyst also reads the views and materialized views there.
- Does NatureQuery copy my database?
- No. It reads the structure of your tables to write queries, and query results pass through to your browser without being stored.
- How do I connect Supabase?
- Choose Supabase when you add the connection. In Supabase, click Connect and copy the Session pooler connection string, then paste it with Paste connection string.
- Is there a free plan?
- Yes: 50 AI questions and 5 Analyst investigations a month on one database connection, with no card needed.