Link? My reading last time I looked at this was that the sqlite and postgres “jsonb” were different.
Re:JSONB Has Landed in SQLite
by cryptonector on Wednesday December 06, 2023 @12:13PM
(#38546688)
This is the first time that SQLite3 is getting JSONB. Idk if it's the same as PG's. TFA doesn't say. I assume they are the same or similar because I seriously doubt that D.R. Hipp is unaware of PG's JSONB, but then for that reason I am surprised that he didn't say in TFA.
https://sqlite.org/draft/jsonb.html references postgres:
> The "JSONB" name is inspired by PostgreSQL, but the on-disk format for SQLite's JSONB is not the same as PostgreSQL's. The two formats have the same name, but they have wildly different internal representations and are not in any way binary compatible.
Re:JSONB Has Landed in SQLite
by cryptonector on Wednesday December 06, 2023 @12:27PM
(#38546891)
https://sqlite.org/draft/jsonb.html says they're NOT the same.
Re:JSONB Has Landed in SQLite
by cryptonector on Wednesday December 06, 2023 @12:26PM
(#38546886)
Ah, https://sqlite.org/draft/jsonb.html says:
> The "JSONB" name is inspired by PostgreSQL, but the on-disk format for SQLite's JSONB is not the same as PostgreSQL's. The two formats have the same name, but they have wildly different internal representations and are not in any way binary compatible.
> TFA doesn't say that this is _the_ JSONB of PostgreSQL fame, but I assume it must be.
Definitely is not: Hipp states
> JSONB is also slightly smaller than text JSON in most cases (about 5% or 10% smaller)
Whereas in Postgres jsonb commonly takes 10~20% more space than json.
Originally JSONB used only offsets, but that made it incompressible. That held up a PostgreSQL release for some time while they figured out what to do about it.