JSONB je PostgreSQL-ov binarni JSON tip — pohranjuje JSON podatke u učinkovit, upitljiv i indeksabilan format. Omogućava vam pohranu fleksibilnih, polustrukturiranih podataka u relacijskoj bazi podataka, kombinirajući relacijsku integritet s fleksibilnosti sličnom NoSQL-u. To je jedna od naj moćnijih mogućnosti PostgreSQL-a.
JSONB vs JSON
JSON → stores the exact text (preserves whitespace/key order/duplicates), parsed each query
JSONB → stores a DECOMPOSED BINARY format → slightly slower to write, but MUCH faster
to query, and supports INDEXING and rich operators
→ Use JSONB in almost all cases (JSON only if you need exact text preservation).
