Dbctx – Compile a PostgreSQL database into compact, queryable context
Hi HN, I've been finding increasing need for helping our users chat with the underlying application data in postgresql directly using LLMs, visualize results and so on. A major obstacle to this is -- traditional sql schema doesn't contain enough information for an LLM to easily query things in one shot. For example, traditional schema doesn't say what is the expected/allowed value set in a state field, or what are the paths available embedded in a jsonb field. Also -- given a user query -- only a small fraction of the whole schema is relevant for an LLM to construct SQL queries. So…
What it does
Compile a PostgreSQL database into compact, queryable context. - shrsv/dbctx
In the maker’s words, at launch
Hi HN, I've been finding increasing need for helping our users chat with the underlying application data in postgresql directly using LLMs, visualize results and so on. A major obstacle to this is -- traditional sql schema doesn't contain enough information for an LLM to easily query things in one shot. For example, traditional schema doesn't say what is the expected/allowed value set in a state field, or what are the paths available embedded in a jsonb field. Also -- given a user query -- only a small fraction of the whole schema is relevant for an LLM to construct SQL queries. So filtering parts of schema relevant to construct a prompt is important. dbctx solves all these by inspecting a postgresql database and turning the results into an sqlite backed ".dtx" file. You can pass your natural language query to dtx, and get relevant tables in a compressed schema format along with field/json intelligence embedded in it. This leads to much better responses from the LLM from the getgo. I have a CLI, library and tiny UI embedded in a single go binary. Do give it a go, and any feedback welcome.
Does the same job
all alternatives →- PNPostgresqlco.nf: PostgreSQL Configuration for Humans2020 · ongres.com · ▲223

- GFGraphQL for Postgres2015 · github.com · ▲195
- OFORM for TypeScript with no query-builder, supporting full SQL queries2020 · github.com · ▲220

More ai this month
the category →
I trained a 125M-parameter transformer to autocomplete piano performances in real time (~108 notes/sec on an iPhone 15). The idea is basically GitHub Copilot or Tabnine, except instead of prompting it with code, you prompt it by playing a few notes on a MIDI piano. The model then continues what you played, entirely on-device. The app is free if anyone wants to try it. Happy to answer questions about the model, training, Core ML, or the many things that didn't work.
AI · 17d ago · simedw.com
Astute▲585Automate your B2B brand going viral, with new media creators
AI · 18d ago · company-app.joinastute.com


Hey HN, Henry from Cactus here! We previously released Cactus Needle, a 14MB agentic LLM for tool call, device use, and structured extraction for phones, wearables, smart homes, small robots and microcontrollers. We got really great feedback here, and have now incorporated the suggestions to release Needle 2. The whole model is a single 14MB binary that runs a full session in 28MB of RAM; 45m parameters at 2bit compression. Needle hits 500 tokens/sec decode speed on a Raspberry Pi 5, sits between 400-1,500 tokens/sec on VR devices like Meta Quest 3S and Apple Vision Pro, and ranges…
AI · 26d ago · cactuscompute.com


Launched alongside, August 2026
the whole month →- TL
Life & fun · 10d ago · louisabraham.github.io


- SA
Hello HN! I found that picking out plausible but diverse skin tones for my digital art and game development projects was kind of difficult, and I got curious about if there was a way to define a color space that made it easy. I've built a color picker and procedural generation algorithm based on the space as well as a bunch of other fun js features and demos throughout the page that use the equations. If you find it interesting, I have lots of explanations of how I built it and what properties the space has. The methodology might be a bit shaky, but hopefully the result is as helpful for…
Life & fun · Aug 2026 · toneyalexander.github.io


I trained a 125M-parameter transformer to autocomplete piano performances in real time (~108 notes/sec on an iPhone 15). The idea is basically GitHub Copilot or Tabnine, except instead of prompting it with code, you prompt it by playing a few notes on a MIDI piano. The model then continues what you played, entirely on-device. The app is free if anyone wants to try it. Happy to answer questions about the model, training, Core ML, or the many things that didn't work.
AI · 17d ago · simedw.com