This document discusses PostgreSQL's support for JSON and JSONB data types, including:
- The JsQuery language for querying JSONB data, which allows expressing complex conditions over JSON arrays and fields using a simple textual syntax with operators like # (any element), % (any key), and @> (contains).
- Examples of using JsQuery to find documents containing the tag "NYC", find companies where the CEO or CTO is named Neil, and count products similar to a given ID within a sales rank range.
- Performance comparisons showing JsQuery outperforms the @> operator for complex queries, and is more readable than alternatives using jsonb_array_elements and subqueries.
-