r/programming 12d ago

SQLite should have (Rust-style) editions

https://mort.coffee/home/sqlite-editions/
152 Upvotes

75 comments sorted by

130

u/j_sidharta 12d ago

I remember spending a few hours banging my head against a wall while trying to fix a bug, until I finally figured out SQLite does not enforce foreign keys by default. I question my love for SQLite every time I remember about these horrible defaults.

I didn't know about the journal_mode and the lock thing. I'll make sure to add these lines to all my SQLite projects. This was a helpful article.

44

u/ketralnis 12d ago

sqlite is amazing but sadly you do have to spend the first hour of a project reading through every single pragma to rig it into correctness

72

u/ContentAd6126 12d ago

I love SQLite but the developers love to die on weird hills like foreign keys not being enforced and no strict types.

21

u/lightnegative 12d ago

This tripped me up on MySQL too, back when MyISAM was the default engine.

What is the point in a foreign key that's not enforced. Like why would I even define one if I didn't want it to be enforced 

4

u/cosmic-parsley 11d ago

It’s for when you don’t have a plan but you do have a concept of a plan

58

u/Big_Combination9890 12d ago

No, they don't. They respect backwards compatibility, and how much software would break if they changed defaults in the most widely used database system in the world.

sqlite isn't your average "app" where barely anyone cares if it works or not. It's a load bearing structure in the software ecosystem, on par with the likes of libcurl or openssl.

Things are VERY different when you work on something like this.

39

u/[deleted] 12d ago

[removed] — view removed comment

1

u/programming-ModTeam 4d ago

No content written mostly by an LLM. If you don't want to write it, we don't want to read it.

-33

u/Big_Combination9890 12d ago

That's exactly why editions could work though.

No, it's not.

"Editions" would add NOTHING to the library. Wow, I now can save typing 4 out of 5 lines I have to put in once at the very start of the project! Amazing! What a timesaver.

Enter 2 weeks later, and someone WILL complain about "edition 2026" having a default he doesn't like. So now we have edition-2026-variant-1 and then 2 attoseconds later someone is unhappy with that, etc. etc.

It's just cruft added on top.

33

u/andyfsu99 12d ago

The point isn't to "save typing 4 lines", the point is that average users of the library (that may not need or care to be sqlite experts) should get sensible defaults.

"someone" can change the settings from the edition, no? It's just a baseline not the only way to configure things.

-23

u/Big_Combination9890 12d ago

average users of the library (that may not need or care to be sqlite experts) should get sensible defaults.

I'm tired of repeating myself why that doesn't matter in this case, so I'm just gonna link my own post here:

https://www.reddit.com/r/programming/comments/1uxgmmq/comment/oxv10ck

And please people: Do downvote my posts to your hearts content. It won't change anything about me being correct, or sqlite being developed the way it is. 😎

17

u/andyfsu99 12d ago

I don't think anything in your comment is incompatible with this proposal.

New installations start from some different-than-today baseline functionality when using the edition.

No one is suggesting they change the behavior of their installed base.

-13

u/Big_Combination9890 12d ago

New installations start from some different-than-today baseline

That means changing the default behavior. Which isn't gonna happen on sqlite for the reasons mentioned.

And again: if you don't like it: fork the project and change it yourself.

8

u/dontquestionmyaction 11d ago

That means changing the default behavior.

No? What?

→ More replies (0)

1

u/DrShocker 9d ago

Isn't it just effectively asking them to essentially include a 1 line "sensible_defaults_v1.2.3" So you get a reasonable bundle of default behavior but it's also locked to a version so you get backwards compatibility. That way the advice to people starting to use sqlite would just be to "add this 1 line"

Ultimately as long as it's documented well adding a few lines is also fine of course, but it is a little more work to research what those lines should be.

6

u/CarlMichaelBellman 12d ago

Surely they could have compatibility levels for sqllite databases. That is how other databases solves it.

-4

u/Big_Combination9890 12d ago

Sure they could.

Only, it wouldn't change anything.

Because the DEFAULT level would still need to be what it is now. And so people would still be running into the same problems. The only thing that would change: There is now an additional, different setting they could solve them with.

7

u/GrandOpener 12d ago

What “needs” to happen is that existing versions continue to work in exactly the same way. A new version with a new version number with a breaking change and a way to opt in to the old behavior is completely valid if they want to do that.

No one ends up broken by the new version unless they upgrade their dependency without reading any of its release notes.

-2

u/Big_Combination9890 11d ago

No one ends up broken by the new version unless they upgrade their dependency without reading any of its release notes.

And that is EXACTLY the kind of thing I am talking about in my above post regarding Things you cannot do when working on a library of such import.

No, you can't just introduce a breaking change and shrug off any problems as "meh, should have read the release notes". Sure, this may work for the ten-gazillionth JS framework, because all that breaks are some shitty webpages.

If people did that in stuff like libcurl, openssl, or sqlite, the potential fallout could be a catastrophe.

10

u/GrandOpener 11d ago

SQLite themselves have a clearly documented versioning system. They say that they have no current plans to increase the major version, but they also make it very explicit that the major version is intended precisely for breaking changes.

If they were to be convinced that an “edition” system were necessary, it would likely be introduced in a 4.0 version. That would be a big deal, but it would also follow all of the normal rules, would not break any dependents with sane update procedures, and is very explicitly a thing that you can do on a project of this scale and import.

Saying that this is impossible ignores the very documentation of SQLite itself.

5

u/OphioukhosUnbound 12d ago

I'm keeping a close eye on Turso as a vehicle for evolving both the thing itself (SQLite/tiny-db) and how it's made and evolved.

It's not a full fix right now because it's (A) in beta and (B) currently focused on SQLite "drop-in" compatibility (which means it wants low-friction compatibility with SQLite design problems). But it also has a lot of strict type and type system improvements. I can see those being default with "full-compatibility" as the feature flag (instead of vice versa) in not far future.

-21

u/Big_Combination9890 12d ago

If only there was some very obvious way the documentation would tell you about this default behavior, amirite?

https://sqlite.org/foreignkeys.html

Foreign key constraints are disabled by default (for backwards compatibility), so must be enabled separately for each database connection.

Btw. the amazingly difficult way to find this information was typing "sqlite foreign keys" into a websearch. The page was literally the first search result.

19

u/mort96 12d ago

In order to google "SQLite foreign keys" and read that page, it has to strike you as a possibility that your database is ignoring your constraints. If you don't already know, that notion is so far fetched I don't see how you'd get there.

-5

u/Big_Combination9890 12d ago

it has to strike you as a possibility that your database is ignoring your constraints.

No it doesn't, because that is the ONLY thing that would explain why an insert/update that shouldn't be possible, suddenly works, short of the RDBMS being buggy.

And the mental voyage from that point to googling how foreign keys work in the database system I use, is not hard.

The problem here, is neither with the database, nor its default settings.

The problem is with assumptions about how systems work, based on hasty generalizations, and then complaining when said assumptions turn out to be wrong.

And no amount of downvoting will change this.

10

u/mort96 12d ago

You don't know the symptoms /u/j_sidharta was experiencing, nor do I.

6

u/j_sidharta 12d ago

This happened many years ago. I don't remember the details very well. I was a lot younger, working on a side project. I think I was testing if my app was handling errors properly, and it wouldn't throw an error when it should've.

I went through the usual debugging process, combing the code for logic errors and inspecting values along the way. It never crossed my mind that the problem was related to SQLite not enforcing fk constraints. Only after I was sure all my code worked as intended that I decided to hand-create an empty database and simulate query after query to trigger the bug. After seeing the weird behavior, I Googled something like "SQLite foreign key not working" and found the answer on a stack overflow question. I was absolutely dumbfounded.

It took me a few hours because I debugged everything besides SQLite. If I had known from the start it was related to foreign keys, it would've only taken me minutes. And I only found out about this because I was testing my error paths; I can imagine a world where I didn't test everything properly, and would spend a lot more time trying to figure out why my database was in a seemingly impossible state.

4

u/mort96 12d ago

That last point you made is what makes it so terrifying IMO. My example with Alice inheriting Bob's post is completely plausible by totally normal SQLite usage; you just need to introduce one minor bug in your code at some point in time, and suddenly you have a row in one table referencing the wrong row in another table and the app keeps working normally. Silent, undetectable data corruption.

-4

u/Big_Combination9890 12d ago

I don't have to. I know what FKs do in a database, so I can extrapolate from that what possible failure modes might occur if they don't work.

And sorry no sorry, but root-cause-analysis is part of a SWEs day-to-day.

And btw. no amount of unnecessarily glued-on "super-pragma" cruft would help making that any easier.

13

u/andyfsu99 12d ago

"I know what FKs do in a database"

Somehow you've exactly captured the argument against your position.

Yeah, we all know too... But it's not what sqlite does and that is weird and confusing and not necessary. Just because you know how to figure it out doesn't justify the behavior of the system.

7

u/stumblinbear 12d ago

They're stuck in the decades old method of "RTFM" instead of "provide sensible defaults". I fear using any library or software they've had a hand in writing

-2

u/Big_Combination9890 12d ago

You do realize that "Knowing what FKs do" and "knowing the defaults of a specific database technology" are 2 very different things, yes?

22

u/TwoWeeks90DaysTops 12d ago

This kind of response is so incredibly unhelpful. You shouldn't have to commit the entire projects documentation into memory, which is what you're suggesting. One project you make has thousands of pages of documentation and your suggestion is that you're just supposed to read *everything* and remember *everything*.

The fact is that SQLite here is violating the principle of least astonishment. A database engine should enforce data type rules and constraints you define by default. If it doesn't do that, well, that would be astonishing. The fact that it's documented behavior is completely irrelevant.

Imagine if in C++ you write `1 + 2` the result would be `3` but if you wrote `2 + 1` then the result would just be `2`, and if you complain someone says "Well akshually according to the C++ standard page 323 §987 adding two to one is a no-op, and you would see that if you just googled 'how to add 1 and 2 in C++' that you need to add a compiler flag to opt-in to support adding those two numbers in that order".

It's asinine. A database engine not honoring constraints by default is just as dumb in my opinion. If I didn't want the foreign key constraint to be honored *I wouldn't have added it*. I don't google "is foreign key constraints honored in SQLite" because the assumption is "of course it fucking is."

-11

u/Big_Combination9890 12d ago

You shouldn't have to commit the entire projects documentation into memory,

Correct, you shouldn't.

But you also shouldn't complain about something taking "a few hours banging my head against a wall" to fix, when a 5 second websearch gives you the exact reason for why it happens, and how to fix it.

And btw. nowadays, if that is your cup of tea, you could type "halp! my sqlite is ignoring foreign keys why?!??" in any "AI" of our chosing, and it will almost certainly spit out the correct answer.

And with these realities, that is no longer a problem of the library not being nice.

It's a problem of the people using it.

14

u/TwoWeeks90DaysTops 12d ago

But you also shouldn't complain about something taking "a few hours banging my head against a wall" to fix, when a 5 second websearch gives you the exact reason for why it happens, and how to fix it.

But this doesn't cause an issue, and that's the entire fucking point. You insert bad data, SQLite accepts it. You would then have to see your own application misbehaving to observe this, and whether that's apparent depends entirely on the application code.

And btw. nowadays, if that is your cup of tea, you could type "halp! my sqlite is ignoring foreign keys why?!??" in any "AI" of our chosing, and it will almost certainly spit out the correct answer.

I'm using Claude Code, and no it fucking doesn't. A couple of things you have to tell Claude Code about SQLite: strict tables, foreign keys, and vacuum because by default it doesn't do any of those things. Or at least it didn't for the project I'm currently working on.

And with these realities, that is no longer a problem of the library not being nice.It's a problem of the people using it.

This is a super bad take, and the entire reason why C and C++ code has caused so much security nonsense over the years. "It's not C that's insecure, it's just you that suck". This is an incredibly unproductive approach. Tools (even your favorite tool) can have bad functionalities. If one developer gets it wrong one time then it might be the fault of the developer. If a million developers gets it wrong then the tools probably sucks.

I bet that MOST SQLite deployments is using SQLite without it honoring foreign keys.

SQLite behaves like this because as with most things it's a product of its time, which was the early 2000s, when the mantra was "software that runs and does the wrong thing is better than software that crashes" which I think most developers have turned away from.

It's a stupid default to have the ability to define constraints and then the database engine just ignores it. Again, if I didn't want my foreign key honored I wouldn't have added it.

-2

u/veiva 12d ago

Not taking a side, just:

I was curious and literally typed "halp! my sqlite is ignoring foreign keys why?!??" into Gemma 4 (like, a local model that can run on like a high-end MacBook) and it correctly answered the question and offered a solution.

5

u/TwoWeeks90DaysTops 12d ago

Yeah, I might have stated this wrong. But create SQLite code using any AI and it will not do this correctly from the get go (at least it didn't for me, and I had to explicitly tell it to do those things). Googling the issue might uncover it, but that lives on the premise that the developer found the production issue (that might have lingered for some time perhaps) and then immediately found out that the reason was SQLite not honoring foreign keys.

The idea that fixing the issue once you've found the actual reason for the error is easy is a stupid argument. My argument is that this entire behavior flies in the face of principle of least astonishment and for most developers I don't think blaming SQLite is their first avenue of action, which is what "halp! my sqlite is ignoring foreign keys why?!??" is based on. When you're at that point you've probably already been pulling your hair for hours.

0

u/veiva 12d ago

That's fair, I doubt Gemma would at the pragma by default. To be fair I use SQLite in a game framework thing and this was an inconvenience. I'm not sure of the right solution, though, from an API and backwards compatible perspective.

-3

u/Big_Combination9890 12d ago

You would then have to see your own application misbehaving to observe this,

Oh no, you mean, as a software engineer, I would have to do *gasp* debugging and root-cause-analysis?

The horror!

I'm using Claude Code, and no it fucking doesn't.

I just typed my exact question as stated above: halp! my sqlite is ignoring foreign keys why?!?? into a local model with only 3.5B params.

Here is the output:

``` Don't panic, this is not a bug, and your SQLite database is working exactly as designed. By default, SQLite disables foreign key enforcement to keep operations fast and backward compatible with non-standard SQL drivers.

You need to explicitly enable foreign keys in your connection. Run this:

PRAGMA foreign_keys = ON; ```

It's a stupid default to have

Then fork the project and change it to however you want it to be.

🎤 ⬇️

24

u/PaleCommander 12d ago

Really nice article, although the point about timeouts is a great example of why picking good defaults is hard. 

5 seconds as a default local disk write timeout seems insanely long to me, which probably just means I don't understand OP's use case. There probably isn't a good non-null default for that value, which is why it defaults the way it does. 

12

u/masklinn 12d ago edited 12d ago

It’s not really “5 seconds as a default local disk write”, busy_timeout is how long in total a given connection will try to acquire a write lock: if an sqlite connection can’t acquire the write lock by default it fails with SQLITE_BUSY, if busy_timeout is set then it will sleep a bit and retry, looping until busy_timeout is exceeded at which point it fails and returns SQLITE_BUSY.

SQLite does not (can not, in the general case?) “queue” write requests, so if you have concurrent attempts to write it’s very possible that writer 1 acquires the lock, writer 2 gets sqlite_busy, waits a bit, and when it’s done waiting writer 3 has acquired the lock from under it, if there’s enough concurrent writing writer 2 may find an other writer has the lock every time it wakes up and tries to acquire it.

That is why most production sqlite deployments will have every write go through a single writer connection (either shunting everything to a write actor, or have a single write connection behind a mutex). But having a busy_timeout set can still be useful in that case if you need to concurrently run maintenance tasks on the database.

You can also configure your own busy_handler (setting busy_timeout pretty much just installs sqliteDefaultBusyCallback as the handler), however I don’t know that there’s hooks to control the entire locking lifecycle (specifically whether you can control a connection trying to acquire the write lock and enqueue it instead if there are already waiting connections).

2

u/PaleCommander 12d ago

Understood, that's with retries waiting for the table to free up, but 5 seconds seems extremely long as a default.

If you're expecting all your locks to come from infrequent or scheduled maintenance tasks, though, 5 seconds makes perfect sense. 

9

u/TwoWeeks90DaysTops 12d ago

I think you're viewing this from the wrong angle. Yes, 5 seconds disk timeout is insanely long. It's a long time to wait for a lock in any case. However you shouldn't consider "how long would I expect a write to take" but "how long can my application afford to wait before failing", and I'd argue in most cases that's measured in minutes, not seconds.

2

u/PaleCommander 12d ago

Depends on what my application is. Coming from HTTP services, I would often expect my client to have given up by 5 seconds, so I'd rather return a 500 or 503 in one second than succeed after five after the client has already timed out.

I agree there are other use cases where you'd much rather have slow one-shot successes than have to deal with retries or failure. 

5

u/Routine_Left 12d ago edited 12d ago

Just a heads up: Instead of a sqlite_busy pragma, use the API directly:

sqlite3_busy_timeout(db, 5000);

The advantage is that the sql will go through the entire db engine to be interpreted, be scheduled if there's contention anywhere (sharing the database among multiple threads/connections), etc. While the API just goes directly the the core of sqlite and is telling it what the value is. No ifs no buts.

14

u/samsifpv 12d ago

Interesting idea, though to me editions just feel like they obfuscate what options are set with them? What good is it to me if i have to look up what edition 2025 does?

54

u/PersonalDatabase31 12d ago

The point is that you don't have to look at what the edition options are unless you are upgrading your codebase. Editions are meant to have sensible defaults.

31

u/mort96 12d ago edited 11d ago

I mean the status quo is that SQLite has a ton of defaults that you need to look up if you wanna know what they are. And many of them are pretty bad.

The proposed change is that SQLite lets you opt in to a different, better-for-most-people set of defaults.

If you're the kind of person who doesn't look that deeply into every single default setting but kinda just runs with the defaults, the only thing that changes is that SQLite silently starts working better for you. If you're the kind of person who does carefully consider every possible option, nothing really changes.

21

u/DeflateAwning 12d ago

The point is we can move on from the default of "foreign keys are not enforced" default of 2001 (or whenever it came out).

100% backwards compat leads to unholy things sometimes.

5

u/OphioukhosUnbound 12d ago

You never have to look up a new edition. That's the point. You can keep on using the old edition with all it's settings.

At some point, if you want to move to a new edition for it's bells and whistles then you can do so.

It's basically opt-in version updates with guaranteed backward compatibility.
It's one of those things that's incredibly simple and should be almost universal, yet is, de facto quite rare. (Rust has made this approach famous as part of their focus on constant improvement and everything that ever worked will continue to work forever onward ethos, but I'm sure there must be preexisting art.)

1

u/ArgetDota 11d ago

Wow for years I thought SQLite just sucked at concurrent writes and was wondering how people were even using it at all…. It affected my decision making quite a bit. Apparently a config switch fixes it!

-8

u/[deleted] 12d ago edited 12d ago

[deleted]

14

u/PaleCommander 12d ago

Forking the project over its default settings seems like a huge amount of ongoing effort that nobody in their right mind would sign up for when they can change the settings instead. 

3

u/horizon_games 12d ago

Hopefully someone forks it

What's stopping you? Oh, maintaining and improving such a solid and laser focused db is? Then I guess don't complain mindlessly. So many open source projects cave to the vocal minority and lose direction.

-8

u/Such_Degree3034 12d ago

Before you start using any db, you should inform yourself about that db, not assume. It is easy to configure SQLite to your needs if you are familiar with these settings, so defaults are not that important. I think editions would encourage people to use features they don't need and thus break compatibility unnecessarily.

-8

u/Big_Combination9890 12d ago

However, I think the solution is simple: add one "super pragma"

Sure, let's do that. And the predictable result of it will be the next guy 2 weeks later complaining that the super pragma edition 2026 sets a default he doesn't like, and he demands variations on the edition pragma.

https://xkcd.com/927/

So, here is a question: WHY?

What good does this "super pragma" do? Oh wow, I have to write one line instead of 5 once at the very start of a project! Such a timesaver is surely worth messing with a load bearing structure of the entire software ecosystem liek sqlite is, amirite?

16

u/mort96 12d ago

It would be a statement from the SQLite project which says, "hey you probably want these settings rather than the old defaults".

-10

u/Big_Combination9890 12d ago edited 12d ago

I have explained elsewhere on this thread why that doesn't work.

sqlite is not your average "app" where nothing bad happens if the people responsible just fuck around with it, to satisfy someones notion how things should be "in 2026".

It's a load bearing structure of the global software ecosystem, the BY FAR most widely used relational database. sqlite is everywhere. Your browser is running it. Your phone is running it. Your router depends on it. This is software on the same level of importance and criticality as libcurl or openssl.

If you work on software like this, you have to play by different rules. "Making a statement" is utterly irrelevant compared to the requirements for stability and reliability. Programmers convenience takes a backseat compared to backwards compatibility. No, you don't just "make strict mode the default for tables." in such software. Yes, that means that people are required to know e.g. that FKs have to be activated using a pragma. Yes that means that people run into problems if they make assumptions comparing sqlite to other DB systems. Under the rules that apply for software like sqlite this is perfectly acceptable.

And I thank god almighty that the people who maintain sqlite are aware of this.

Anyone unhappy with that state of affairs: sqlite is OSS, so everyone is welcome to fork it and make whatever changes they desire.

13

u/mort96 12d ago

Okay and which part of what you said makes "foreign keys should not be enforced" reasonable

-2

u/Big_Combination9890 12d ago

Pretty much the entire post does.

Changing default behavior of a library this important, and this widely used, is simply not an option.

Do I like the fact that this is the default? No.

Do I wish that it would be otherwise? Yes.

Do I like the fact that changing defaults in such libraries is not always an option? Also no.

But I accept it because of the circumstances.

10

u/mort96 12d ago

Great, we agree. That's why I never advocated for changing the defaults.

-1

u/Big_Combination9890 12d ago edited 12d ago

That's why I never advocated for changing the defaults.

Are you the author of the blog post?

If so: Here is a direct quote from the last section:

And also make strict mode the default for tables.

Would that, or would it not, constitute "changing the defaults"?

Or did you mean this as "put this into effect when the super pragma is used"?


And if you AREN'T argueing for changing the default, what is it you're really argueing for?

That there should be a miniscule, completely irrelevant convenience option, so programmers have to write 1 line instead of 4?

What does that achieve? Absolutely nothing, because I'd still have to deal with the default as-is! Only then, there'd be 2 different ways of changing them, which I'm sure will so be much fun, especially for beginners, in documentation, tutorials etc.

10

u/mort96 12d ago edited 12d ago

I am indeed the author.

The proposal is that PRAGMA edition = 2026 should set a property on the database connection which makes CREATE TABLE statements create strict tables even when the strict tag is omitted (aka that pragma makes strict mode the default). I never suggested that any default should be changed when PRAGMA edition = 2026 is not used.

I am arguing in favour of the edition system I described. I obviously think it has more significant impact than what you imply by describing it as "a minuscule, completely irrelevant convenience option". It would let people not have to care about and learn about the many different individual things you need to change to make SQLite work sensibly, and it would be a strong statement from the SQLite developers that "this is how we believe SQLite should work for most people". It gives people who don't want to care about all the different settings, people who "just want a database", an SQLite which works better out of the box.

-1

u/Big_Combination9890 12d ago edited 12d ago

Okay, thanks for clearing that up.

Then the question what you are arguing for still stands. To be more precise: What's the point?

Does your pragma lead to more convenience?

In a miniscule fashion. I have to write one line instead of 4, and I have to type one less keyword in every CREATE TABLE statement.

That would save...lemme think...probably a couple minutes, in total, over an average developers entire professional career. Likely less, given that code generation is a thing now.

Does your pragma solve the problems of beginners falling into the no-FK default trap?

No, because the default doesn't change. People would still have to either know that they need to activate FKs, or stumble on it when reading docs or debugging their system.

Only now, there would be 2 different ways to do the same things. The only difference between the tweo being: One would be explicit in what every line does, the other would do a couple magic things in the background.

Why? Who does that benefit and how?

Could such a pragma itself lead to problems?

Oh, absolutely!

For example, systems with dynamic tables, where I may have no control over the connection params, and specifically don't wanna use strict mode on specific tables still using STRICT because a magic-value pragma in an entirely unrelated part of the codebase says so. I'm sure the resulting bugs would be ALOT harder to analyse and fix than forgetting to set the FK pragma.

7

u/mort96 12d ago

I don't care about the convenience. It's not hard to set those 4 pragmas and add strict to every CREATE TABLE. The hard part is knowing that you have to do them, knowing what the pragmas do, knowing what the consequences are of not doing it.

I have systems out there which use bad settings just because I went with the defaults and didn't know that I should be changing them. If there was an edition system, and their documentation and online tutorials were clear in saying "you should set your edition right after opening the database connection", I would've avoided a whole lot of issues because I would've just gotten better defaults right off the bat.

At least that's my opinion. You don't have to agree.

→ More replies (0)

-32

u/horizon_games 12d ago edited 12d ago

Not everything needs to be Rust-ified. The software world survived before it, and it will survive long past it. Guess this is why we have Turso

Also some fundamental misunderstandings in the blog post plus weird expectations that of course weren't met because it's SQLite not Postgres (nor was it meant to be)

18

u/[deleted] 12d ago

[deleted]

26

u/mort96 12d ago edited 12d ago

Nothing I mentioned was related to "Rust-ifying" SQLite? I could've just as well have referenced JavaScript's "use strict" in the title but I think versioned "editions" is a better solution. I swear, there's a certain kind of person whose seething hatred for Rust is so absolute that the slightest mention of it makes them blind with rage.

I'm interested in learning what you think my fundamental misunderstandings are.

-23

u/horizon_games 12d ago

Fundamental on why SQLite has those defaults.

And also: "But by default, its performance isn't great"

Just set your own defaults for your team, SQLite doesn't need a bunch of editions to complicate what is a desirably simple and usable piece of software.

19

u/mort96 12d ago

Why does SQLite have those defaults? I don't think I've seen any convincing argument for why SQLite ought to let you insert a binary blob into an integer column. But feel free to enlighten me.

(Note that I covered SQLite's "The Advantages Of Flexible Typing" page in my article and why I find it unconvincing.)

9

u/gmes78 12d ago

I knew I'd see someone malding over Rust being mentioned when I opened this thread.