Ok tens of billions I believe, but trillion+ is likely an exaggeration
The webpage is a bit unclear about the difference, I'll agree
11–20 of 92 posts
Ok tens of billions I believe, but trillion+ is likely an exaggeration
The webpage is a bit unclear about the difference, I'll agree
They'd have one trillion + 1 if they had better JSON support. I'd be using it in a large healthcare project I'm working on now. Unfortunately, the JSON support is basically "serialize to a string". Postgres is miles ahead with jsonb. Shame, I <3 sqlite.
But if you really wanted to use SQLite to store JSON à la jsonb in PostgreSQL you can use generated fields[1]
sqlite> create table t(id integer primary key autoincrement, data text);
sqlite> insert into t(data) values ('{"foo": "value", "bar": "other value"}'), ('{"foo": "baz", "bar": "qux"}');'
[…]
sqlite> alter table t add column foo text generated always as (json_extract(data, '$.foo')) virtual;
sqlite> select * from t;
id data foo
-- -------------------------------------- -----
1 {"foo": "value", "bar": "other value"} value
2 {"foo": "baz", "bar": "qux"} baz
You can even use a "stored" (instead of 'virtual') generated field, and create an index on it for fast lookups.It's not as powerful as Postgres, but it does a pretty good job.
They'd have one trillion + 1 if they had better JSON support. I'd be using it in a large healthcare project I'm working on now. Unfortunately, the JSON support is basically "serialize to a string". Postgres is miles ahead with jsonb. Shame, I <3 sqlite.
great for them i guess!
Don’t forget to count all the cruise missiles, too!
On a more serious note, had there been something special about SQLite supporting military use of their project that prompted this? Otherwise that’s the point of free software, people are free to do (mostly) whatever they want with it. Including building weapons. SQLite is so prevalent, it’s almost like pointing out you have to include cruise missiles in the count of active x86 chips, or $insert_bad_guy as an active user of roads and electricity.
They'd have one trillion + 1 if they had better JSON support. I'd be using it in a large healthcare project I'm working on now. Unfortunately, the JSON support is basically "serialize to a string". Postgres is miles ahead with jsonb. Shame, I <3 sqlite.
Could you expand on what Postgres offers that SQLite doesn't in this regard? I'm curious to know what I'm missing out on.
Since PostgreSQL allows for functional indexes, you can query and index the data in a structured way.
For example you have a table t with "id" and "data" where data is a jsonb field like {foo: ..., bar: ...}. You can do
SELECT id, data->'foo'
FROM t
WHERE data->'bar' > 5
Which will yield the value of "foo" (inside the json field) for rows where "bar" (inside the json field) is greater than 5.What an oddly discriminatory thing to have on the code of ethics...
EDIT: I'm convinced this must be some sort of forgotten April fool's remnant.
They'd have one trillion + 1 if they had better JSON support. I'd be using it in a large healthcare project I'm working on now. Unfortunately, the JSON support is basically "serialize to a string". Postgres is miles ahead with jsonb. Shame, I <3 sqlite.
I love PostgreSQL, and would recommend it anytime. Even though jsonb is very powerful, in general if you store JSON in a SQL database you're very likely doing something wrong. (You're breaking first normal form) But if you really wanted to use SQLite to store JSON à la jsonb in PostgreSQL you can use generated fields[1] sqlite> create table t(id integer primary key autoincrement, data text); sqlite> insert into t(dat…