How to JSON in PostgreSQL®
This series covers how to solve common problems on JSON datasets with PostgreSQL® and it includes (links will appear once the target pages are up):
How to extract a field from a JSON object in PostgreSQL®?
PostgreSQL® offers two types of data types to handle JSON data, JSON
and JSONB
, and provides several different ways to extract fields from a JSON document:
How to get the JSON field types in PostgreSQL®?
PostgreSQL® offers two types of data types to handle JSON data, JSON
and JSONB
, you can use the function json_typeof
(jsonb_typeof
for JSONB
) to extract the fields type.
How to index and query a JSON object in PostgreSQL®?
PostgreSQL® offers two types of data types to handle JSON data, JSON
and JSONB
. This doc showcases how to index a JSONB
column with a GIN index.
How to check if JSON contains in PostgreSQL®?
PostgreSQL® offers two types of data types to handle JSON data, JSON
and JSONB
, and provides several different ways to check if a value/field from a JSON document:
What are the differences between JSON or JSONB in PostgreSQL®?
PostgreSQL® offers two types of data types to handle JSON data:
JSON
stores the JSON as text, performing a validation on the correctness of the JSON syntaxJSONB
optimizes the JSON storage in a custom binary format. Therefore, on top of validating the correctness of the JSON format, time is spent to properly parse and store the content.
Define a PostgreSQL database connection in JSON and import it in PGAdmin 4
How to define a database connection in a JSON file that can be imported in PG Admin 4