JSONB

JSONB stores JSON in a queryable, indexable (GIN) binary format. The operators ->, ->>, @> and ? access keys and test content. It suits variable or semi-structured attributes, but regular data is better placed in typed columns.

Example

SELECT donnees->>'ville' FROM clients WHERE donnees @> '{"vip": true}';

Related concepts

The whole glossary