POSTGRESQL
Talk to your PostgreSQL in plain English
Self-hosted text-to-SQL for Postgres. Read-only, governed, runs in your infrastructure.
Connect in one step
Ask in plain English
Real Postgres queries Limerence generates from business questions.
“What's our weekly MRR for the last 12 weeks?”
SELECT date_trunc('week', period_start) AS week,
SUM(amount_cents) / 100.0 AS mrr
FROM subscriptions
WHERE status = 'active'
AND period_start >= CURRENT_DATE - INTERVAL '12 weeks'
GROUP BY 1
ORDER BY 1;“Top 10 accounts by feature_flag usage stored in their settings JSONB”
SELECT a.id, a.name,
(a.settings -> 'features' ->> 'advanced_search')::boolean AS uses_advanced_search,
jsonb_array_length(a.settings -> 'enabled_modules') AS module_count
FROM accounts a
WHERE a.settings ? 'features'
AND (a.settings -> 'features' ->> 'advanced_search')::boolean = true
ORDER BY module_count DESC
LIMIT 10;“Show signup-week cohort retention for the last 8 weeks”
WITH cohorts AS (
SELECT id AS user_id,
date_trunc('week', created_at) AS cohort_week
FROM users
WHERE created_at >= CURRENT_DATE - INTERVAL '8 weeks'
)
SELECT c.cohort_week,
COUNT(DISTINCT c.user_id) AS cohort_size,
COUNT(DISTINCT s.user_id) FILTER (
WHERE s.occurred_at >= c.cohort_week + INTERVAL '7 days'
AND s.occurred_at < c.cohort_week + INTERVAL '14 days'
) AS retained_week_2
FROM cohorts c
LEFT JOIN sessions s ON s.user_id = c.user_id
GROUP BY c.cohort_week
ORDER BY c.cohort_week;How it works with Postgres
- Connects via libpq with SSL/TLS by default.
- Schema discovery uses information_schema and pg_catalog.
- Read-replica friendly — point Limerence at any replica DSN.
- Native support for JSONB, arrays, ranges, enums, and custom types.
- Row-level security policies are honored on the connection role.
Postgres questions
Does this work with RDS, Aurora, Supabase, Neon, or Aiven?+
Yes. Any Postgres 12+ accessible over the network works the same way. Limerence connects with the credentials you provide and respects whatever permissions that role has.
Can I point Limerence at a read replica?+
Yes — and we recommend it. Use a read-only role on the replica DSN; the agent never attempts writes.
Does it respect row-level security?+
RLS is evaluated on the connection role at query time, exactly as Postgres always does. No bypass.
How does it handle JSONB columns?+
JSONB columns are surfaced in schema discovery and the agent generates queries using -> and ->> operators where appropriate.
Only your schema structure (table and column names, types) is shared with the LLM. Row data is never sent. Generated SQL runs against your database directly and results stay inside your network.