Top "Jsonb" questions

Binary version of the json data type, used in Postgres 9.4+. The major practical difference is efficiency.

How to perform update operations on columns of type JSONB in Postgres 9.4

Looking through the documentation for the Postgres 9.4 datatype JSONB, it is not immediately obvious to me how to do updates …

postgresql sql-update crud postgresql-9.4 jsonb
Query for array elements inside JSON type

I'm trying to test out the json type in PostgreSQL 9.3. I have a json column called data in a table …

sql json postgresql jsonb lateral
Explanation of JSONB introduced by PostgreSQL

PostgreSQL just introduced JSONB and it's already trending on hacker news. It would be great if someone could explain how …

json postgresql nosql postgresql-json jsonb
Index for finding an element in a JSON array

I have a table that looks like this: CREATE TABLE tracks (id SERIAL, artists JSON); INSERT INTO tracks (id, artists) …

sql json postgresql indexing jsonb
How to query a json column for empty objects?

Looking to find all rows where a certain json column contains an empty object, {}. This is possible with JSON arrays, …

json postgresql types jsonb
Merging Concatenating JSON(B) columns in query

Using Postgres 9.4, I am looking for a way to merge two (or more) json or jsonb columns in a query. …

json postgresql postgresql-9.4 jsonb
How to convert PostgreSQL 9.4's jsonb type to float

I'm trying the following query: SELECT (json_data->'position'->'lat') + 1.0 AS lat FROM updates LIMIT 5; (The +1.0 is just …

sql postgresql casting jsonb postgresql-9.4
Postgresql json like query

I have the following table called module_data. Currently it has three rows of entries: id data 0ab5203b-9157-4934…

postgresql jsonb
Postgresql query array of objects in JSONB field

I have a table in a postgresql 9.4 database with a jsonb field called receivers. Some example rows: [{"id": "145119603", "name": "145119603", "type": 2}] [{"…

postgresql jsonb
Extract key, value from json objects in Postgres

I have a Postgres table that has content similar to this: id | data 1 | {"a":"4", "b":"5"} 2 | {"a":"6", "b":"7"} 3 | {"a":"8", "b":"9"} The …

json postgresql jsonb