cd /news/artificial-intelligence/how-are-you-giving-ai-agents-access-… · home topics artificial-intelligence article
[ARTICLE · art-63933] src=news.ycombinator.com ↗ pub= topic=artificial-intelligence verified=true sentiment=· neutral

How are you giving AI agents access to postgress?

A developer asks how to give AI agents access to a PostgreSQL database, weighing the risks of letting an LLM generate SQL versus using predefined operations, and noting that either approach requires writing deterministic guards.

read1 min views1 publishedJul 17, 2026

I mean we can either let llm generate sql but that's risky right or should we do defined operations?

I mean for both reads and write.

But whether it's llm generate or we define we have to do the manual work of writing determistic guards right...

Comments URL: [https://news.ycombinator.com/item?id=48949955](https://news.ycombinator.com/item?id=48949955)

Points: 1

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @postgresql 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-are-you-giving-a…] indexed:0 read:1min 2026-07-17 ·