frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

SQLite should have (Rust-style) editions

https://mort.coffee/home/sqlite-editions/
45•gnyeki•1h ago

Comments

mort96•49m ago
Oh hi, author here. Fun to see this make it to HN.
simonw•35m ago
Suggestion: post this on https://sqlite.org/forum/forum - the SQLite team monitor that forum closely and I've had some really great answers from them to questions or suggestions in the past.
quadhome•27m ago
https://lobste.rs/c/kzln1c
mort96•27m ago
I haven't really ever participated in that forum before, but it's an interesting idea. I don't know if I'm going to do it, I might. Though I also wouldn't mind if someone else posted about it there. I might even make a forum account and participate in the discussion.
kccqzy•46m ago
SQLite is slightly different from Rust in that it is a data container. It’s somewhat more common for people to move SQLite database files from one machine to another and then inspect using the command line tool. And it is often the case that the embedded SQLite version in your app is a newer version than whatever version /usr/bin/sqlite3 happens to be. Adding editions to your SQLite file will probably break this use case of using an older version to read a database written by a newer version because it does not know what has changed in a new edition.

Not a big deal though. Probably just need better ops to bundle the command-line utility that’s the same version as what’s used in your app.

tptacek•34m ago
For some of these pragmas you have the same issue with or without "editions", right? Busy timeout is per-connection. And then: if you're running in WAL mode, you, the user, have to know that, or risk messing up the database by copying just the .db file rather than vacuuming-into.
kccqzy•28m ago
Editions make the problem worse by requiring the version not only to support the underlying pragmas but also to understand the edition mapping.

Example: PRAGMA foo=1 is introduced in 2027. PRAGMA edition=2030 implies this foo pragma. Now you unnecessarily lock out three years worth of releases.

tptacek•22m ago
I don't see how you don't have the pragma compatibility problem either way. The edition proposal captures a bunch of behaviors that already exist.
kccqzy•18m ago
sethev•37m ago
Interesting idea - I like seeing a list of pet-peeves followed by a proposal for a straightforward way to have a set of 'alternative defaults' that remains backwards compatible. If you don't want to opt in, don't run the new PRAGMA edition = 2026.

Too often it's just a list of issues and a wish that everyone else will change.

In (mild) defense of SQLITE_BUSY - busy_timeout just tells sqlite to sleep and retry up to the timeout when it receives SQLITE_BUSY. It seems like a sensible default for a library to leave that up the calling code - which may have something else it could do while it waits. However, that logic often gets missed!

tptacek•36m ago
This isn't so much a list of pet peeves as it is the almost universal way people that work seriously with SQLite configure the database. It's reasonable to suggest that the alternative settings for each of these suggestions is probably the wrong default for 2026.
sethev•34m ago
Yes, agree. These are very sane defaults and match what I use..
Rendello•31m ago
It might be worth bringing this up on the forum [1]. The developers are quite active there, and it's possible they've never considered this option, or they have considered it and have reasons to not go for it. The original design followed Postel's Law (see my comment from the other say [2]), it would (theoretically) be nice if that mess could be avoided by specifying an edition.

Today I noticed I could do `pragma foreign_key = ON`, and despite the pragma being wrong (it should be foreign_keys, plural), it reported nothing. In fact, it reports nothing with the correct pragma either. So check your pragmas!

1. https://sqlite.org/forum/forum

2. https://news.ycombinator.com/item?id=48900625

Polizeiposaune•18m ago
The Postfix mailer has allowed recommended default behavior to evolve using its "compatibility_level" parameter:

https://www.postfix.org/postconf.5.html#compatibility_level

https://www.postfix.org/COMPATIBILITY_README.html

You get a warning whenever you depend on the deprecated old default until you either move forward or specifically commit to the old behavior.

andai•19m ago
In the first example, there's a a second thing that surprised me: you delete an entity and it's unique ID gets reused? Is that a good idea?

I guess if foreign keys are handled properly then that's not a problem by definition? But it sounds wrong somehow.

andai•13m ago
The "use strict" thing is interesting. I often hear people say, well we can't fix absurd behavior in JS because backwards compatibility! Well, we already did, and we can do it again!
Yes, the problem exists either way. Editions just exacerbate the problem.
appplication•26m ago
It seems SQLite could be evolve to solve this by just bundling itself entirely in the data files? After all, the binary is less than 1MB, anywhere you’re putting a database surely has at least that much overhead, for most applications it’s less than a drop in the bucket.

I’d be interested to learn if there are any db implementations that take this approach, or reasons this wouldn’t work.

mort96•23m ago
Well you'd have the problem that an sqlite database file created on a Linux AMD64 box could be copied to an AArch64 macOS machine to be read there. And quite a lot of (cross platform) software build their file formats on top of SQLite.
appplication•17m ago
I think my silly and unserious naive response would be linear scaling bundled binaries with number of platforms doesn’t seem to be that materially different in terms of total size. But I see your point, didn’t consider the architectures
andai•10m ago
Perhaps it could be an "actually portable executable"?

https://news.ycombinator.com/item?id=26273960

ijustlovemath•24m ago
editions could be self-describing as to certain semantic changes, and you could embed that with the file. older versions could safely ignore it and newer versions parse and run it. you could also force things like "editions must be declared early", "editions are one way only" etc to get some level of security in the adoption of the change
arijun•6m ago
I think you can maintain full backward compatibility with all these changes. SQLite has a bunch of meta-data that you can use to see that no earlier additions have modified your database since you last wrote. You make the new additions, follow this strict rules, but if an old edition modified the db in the interim, you fall back to the original rules until it’s verified compliant again.

UI-Skills

https://github.com/ibelick/ui-skills
1•handfuloflight•1m ago•0 comments

11,700 Free Photos from John Margolies' Archive of Americana Architecture

https://www.openculture.com/2026/07/free-photos-from-john-margolies-archive-of-americana-architec...
1•gslin•4m ago•0 comments

Linus Torvalds "Linux is not one of those anti-AI projects"

https://lore.kernel.org/linux-media/CAHk-=wi4zC+Ze8e+p3tMv8TtG_80KzsZ1syL9anBtmEh5Z40vg@mail.gmai...
3•linolevan•5m ago•2 comments

Lhv.ai – Estonian bank AI integration via MCP

https://lhv.ai/
1•loh•8m ago•0 comments

Show HN: CloudDM 4.0 – open-source database development platform

https://github.com/ClouGence/open-cdm
1•cloudcanalx•10m ago•1 comments

Show HN: Migrate your legacy Google My Maps

https://tasmap.app/
1•apolkingg8•22m ago•0 comments

EBAE: A protocol for bounding the real-world authority of autonomous agents

https://zenodo.org/records/21385239
1•Akumaskills•23m ago•0 comments

Duplicate

https://openai.com/supply/co-lab/work-louder/he
2•akman•23m ago•2 comments

Tachyon: An on-screen AI that points, so you learn by doing

https://heybraza.com
1•orakulus•25m ago•0 comments

The log/event processing pipeline you can't have

https://apenwarr.ca/log/20190216
1•kklee•26m ago•0 comments

Intel Makes Chipmaking History with High-NA EUV Panther Lake Production

https://hothardware.com/news/intel-first-high-na-euv-production
2•kristianp•27m ago•0 comments

Too Old for Silicon Valley? Think Again. AI Is Changing the Math

https://www.kqed.org/news/12090173/too-old-for-silicon-valley-think-again-ai-is-changing-the-math
2•andsoitis•33m ago•0 comments

Looking for Work

4•rmcdermott•35m ago•2 comments

TDD is dead. Long live testing. (2014)

https://dhh.dk/2014/tdd-is-dead-long-live-testing.html
2•yokto•37m ago•0 comments

Vint Cerf is working on a plan to unleash AI agents on the open internet

https://techcrunch.com/2026/07/15/vint-cerf-is-working-on-a-plan-to-unleash-ai-agents-on-the-open...
3•indigodaddy•37m ago•2 comments

Dan Boneh: The elliptic curve running the modern internet might have a backdoor [video]

https://www.youtube.com/watch?v=8WDOpzxpnTE
2•philipfweiss•38m ago•1 comments

Show HN: One More Letter

https://playonemoreletter.com/
10•hmate9•39m ago•3 comments

Reverse Engineering Apple Wallet

2•asxeem•40m ago•1 comments

Show HN: A Monte Carlo model that called the World Cup finalists 2 weeks ago

https://github.com/fabio-ricardo/worldcup-forecasting-model
3•fabioricardo7•40m ago•1 comments

Nul Characters in Strings in SQLite

https://sqlite.org/nulinstr.html
6•basilikum•46m ago•0 comments

Can AI Do RCA?

https://coroot.com/blog/hard-part-of-ai-root-cause-analysis-is-no-longer-the-model/
2•ekiauhce•48m ago•0 comments

Decarbonizing Singapore's Data Centers Using Sumatra's Geothermal Resources

https://ccsi.columbia.edu/the-case-for-decarbonizing-singapores-data-center-boom-using-south-suma...
3•crookedroad44•48m ago•0 comments

Will AI Fix Prior Authorization – Or Make It Worse?

https://undark.org/2026/07/15/medicare-prior-authorization-ai/
2•EA-3167•48m ago•0 comments

Metal-Organic Frameworks, Chemistry's New Miracle Materials

https://chemistry.berkeley.edu/news/meet-metal-organic-frameworks-chemistry%E2%80%99s-new-miracle...
16•andsoitis•49m ago•5 comments

Eaon (Preview)- Private all in one AI super app

https://eaon.dev
2•morriszdweck•49m ago•1 comments

New York won't build big data centers for 12mos, weighs energy and climate risks

https://apnews.com/article/new-york-data-centers-moratorium-ai-c1e05b74208a6c570eec7c658ac8f187
5•1vuio0pswjnm7•49m ago•2 comments

LeetCode in Your Terminal

https://github.com/HarryYCChou/lcx
2•harryycchou•53m ago•0 comments

The Anti-Mac User Interface (1996)

https://www.nngroup.com/articles/anti-mac-interface/
23•ninglor•57m ago•3 comments

Show HN: Homer's Odyssey Tree Viewer

https://github.com/pettijohn/homer-odyssey-tree/
4•pettijohn•59m ago•0 comments

Japan Builds Intelligence Agency It Hasn't Had Since World War II

https://www.nytimes.com/2026/07/13/world/asia/japan-intelligence-agency.html
4•gmays•1h ago•0 comments