PostgreSQL

Databases

Query, optimize, and manage your PostgreSQL databases through natural conversation — powered by OpenClaw and Neotask.

What You Can Do

Query Data in Plain English

Describe the data you need and Neotask writes and runs the SQL query against your PostgreSQL database. Whether it is a simple lookup, a multi-table join, or an aggregation with window functions, you get the results without writing SQL yourself.

Analyze Query Performance

Paste a slow query or describe a performance problem and ask Neotask to run EXPLAIN ANALYZE, interpret the query plan, identify the bottleneck, and suggest the specific index or query rewrite that would fix it.

Monitor Database Health

Ask for a health check: current connections vs. the connection limit, tables with high dead tuple counts, long-running transactions, and autovacuum status. Neotask queries pg_stat_* views and translates the numbers into actionable findings.

Manage Schema and Objects

Create tables, add columns, modify constraints, create indexes, and manage roles — all through natural language. Neotask generates the correct DDL and confirms schema-modifying operations before running them.

Troubleshoot Locks and Blocking

Ask Neotask to identify blocking queries, show which sessions are waiting on locks, and safely terminate specific connections — with confirmation before any pg_terminate_backend calls.

Try Asking

  • "Show me all orders placed in the last 7 days grouped by customer country"
  • "Why is this query slow?" (paste your query)
  • "What tables have the most dead tuples and need a VACUUM?"
  • "Create an index on the users table for the email column"
  • "Which queries are currently running longer than 30 seconds?"
  • "Show me all users with the superuser role"
  • "What is the size of each database on this server?"
  • "Add a NOT NULL constraint to the created_at column in the sessions table"
  • Pro Tips

  • Always ask Neotask to explain its SQL before running it against production — confirm joins and WHERE clauses match your intent.
  • Use "read only" framing for exploratory queries: "just show me the data, don't change anything" so Neotask avoids DML on exploratory requests.
  • Ask for EXPLAIN ANALYZE on queries that return in under 1 second too — sometimes plans look good but have estimation errors that will hurt at scale.
  • When creating indexes, ask whether a partial or covering index would be more appropriate than a full-table index for your access pattern.
  • Combine PostgreSQL queries with downstream tools: "query the database for users who signed up this week and add them to our Mailchimp audience."
  • Works Well With