Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 659 Bytes

2024-01-17-sqlite-jsonb.md

File metadata and controls

26 lines (21 loc) · 659 Bytes
title categories
sqlite gets jsonb!
sql

Sqlite recently got jsonb support.

From my pg experience: in pg, jsonb doesn't allow for dupes, doesn't keep whitespace, and doesn't keep order (showing the internal reordering they do based on key length), so I assume sqlite now got faster when dealing with json.

$ psql -qXc $'select \'{"aaaa":1, "b":2,     "b":3}\'::jsonb'
        jsonb
---------------------
 {"b": 3, "aaaa": 1}
(1 row)

$ psql -qXc $'select \'{"aaaa":1, "b":2,     "b":3}\'::json'
             json
------------------------------
 {"aaaa":1, "b":2,     "b":3}
(1 row)