Show HN: Pg_AI_query – AI powered SQL inside PostgreSQL
github.comHey HN! I’ve been working on a PostgreSQL extension that lets developers write SQL queries using natural language directly inside Postgres.
GitHub: https://github.com/benodiwal/pg_ai_query
Docs: https://benodiwal.github.io/pg_ai_query/
What it does:
Converts plain English to real SQL queries
Performs query analysis and performance reflection
Integrates with the Postgres extension ecosystem
Works locally with custom LLM providers (not tied to a cloud)
How it fits into workflows:
- Data engineers can quickly explore datasets
- BI teams can generate SQL faster
- App developers can embed NL query interfaces
There are a lot of moving parts with some more intergrations. Love, support and contributions are most welcome :)