Hacker News new | ask | show | jobs
How are you giving AI agents access to postgress?
3 points by Eapz_06 15 days ago
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...

1 comments

Do you really need to provide AI full access for postgres? I rather created a small set of fixed tools, rather then raw sql. Each tool has bunch of predefined params and limited context. Each has own purpose: query explain and analize, db monitoring, slow log queries, db healthcheck, backups, etc.