Fleeing Sqlite3, Finding Postgres
LLMs wreck databases EVERY! SINGLE! TIME!
Last summer, when I began working on my health tracker, I needed some sort of way to store tabular data. This is tricky, because I have a grim, age related disability. I got out of software development in the mid-1990s, before I had to learn SQL.
This has lead to a variety of misadventures and quite a bit of personal growth, as I scale the AI developer learning curve.
Attention Conservation Notice:
Yet another episode of Old Man Yells At Cloud. Unless you’re trying to do some dev work of you own, scroll onward, constant reader.
Background:
This is not to say that I’m clueless - I did a lot of database stuff back when, it just wasn’t using SQL. When I began developing again in 2009 my needs were simple, so much so that the Google Sheets API did what I required.
Nor am I helpless. I’ve had to doctor MySQL and Postgres in hosting scenarios, and SQLite3 litters the landscape. It’s every standalone app, every mobile app, it’s quite ubiquitous. You’ve used it repeatedly today, unless you came here the very first thing after you awoke.
And I have been drug through the bushes by Elasticsearch across three major version upgrades. Cranky distributed systems are no stranger …
Problem:
When I was a couple days into my health tracker adventure, I realized I needed tabular data storage. I had just found the Model Context Protocol servers list, and I was sure I needed more structure than a semantic memory MCP I had adopted. Sqlite3 was the natural choice.
And the hazard with ANY database is this - LLMs can NOT be given sufficient prohibitions that they won’t immediately shit all over the place. They’re primed to write in a generative fashion and whatever the situation, they will contrive a way to create extra columns without mentioning it, or if asked for an extra column they’ll copy a portion of the structure of the target table and adjust the rest of their stuff to use it, neatly abandoning the older data in the table you sought to modify.
It’s awful and there’s apparently no stopping it on the level where the problem occurs.
Solution:
SQLite3 is just a simple local database, no login, no nothin’, it’s just a file with a lot of internal structure. The solution to this is using a database with a proper security model. This could be MySQL and friends, this is the one with which I am most familiar, but it’s become a wild garden of competing forks and clones.
MySQL & friends also have the reputation of being meant for the midrange. If you need to scale horizontally, which IS a problem for my startup, that’s gonna be Postgres. Rather than climbing two learning curves, I decided to do just the one.
My solution to the bad behavior from Claude Desktop and the absolutely awful antics of Antigravity was to create a Postgres user named antigravity, which had no privileges to ALTER/CREATE/DELETE tables. If it thinks something needs to be done, it has to convince me. LLMs are sneaky, they’ll seek to escape, so I also had to rename the psql command line program, too. When you run Postgres in Docker the host’s psql automagically logs in as root. This was another lesson I learned the hard way.
Suffering:
Once the database worked in the context of Antigravity, I sought to make it MCP accessible. This took roughly four hours of continuous effort. These are from memory, but I saw
Google results, when it doesn’t AI summarize, are decaying, you get partial results, important things have fallen off the first page, etc.
None of ChatGPT, Claude, Gemini, or Perplexity can be trusted, they’ll just blather a bunch of plausible looking nonsense, so I learned quite a bit about Postgres today by troubleshooting this junk.
Claude Desktop’s sandbox documentation is just … not right. Not on the site, not in the LLM, and certainly not in Google.
Docker network knowledge among the various LLMs is … also not right. When given VERY specific objectives, you won’t get the same answer twice from ONE LLM, and when you try a couple … it’s a frightful, post truth world.
I have some background in all of these things and deep capability in systems administration and networking. This problem really tried my patience. I can’t imagine what someone with no formal education or experience faces when they just wade into vibe coding.
Conclusion:
My approach to Artificial Intelligence has been a sort of Python vs. pig exercise. The models are getting better, or so I hear, but what’s made my life better has been putting up steadily higher barriers against their relentlessly bad behavior in situations where organization and discipline is needed.
This is not … one can not be egotistical about this. I’ve climbed this particular mountain far enough that I can now see many of the places I have not yet been. Having the precise formal education to take advantage of this opening is … I’m never in the right place at the right time, unless of course it’s something where I can maybe trigger an international incident.
If you are contemplating steps in this direction, pick a proper database, over one with the reputation for being simple and easy. What you want to do, if you’re vibing your way into this, is to ask about the security model. And if there isn’t a way to make an account that’s purely a user, and not a DBA, then move on to the next option.


