add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
mydata
{ "sometag": {}, "where": [ { "id": "Krishna", "nick": "KK", "values": [ "0" ], "function": "ADD", "numValue": [ "0" ] }, { "id": "Krishna1", "nick": "KK1", "values": [ "0" ], "function": "SUB", "numValue": [ "0" ] } ], "anotherTag": [], "TagTag": { "tt": "tttttt", "tt1": "tttttt" } }
SELECT 1
mydata value
{ "sometag": {}, "where": [ { "id": "Krishna", "nick": "KK", "values": [ "0" ], "function": "ADD", "numValue": [ "0" ] }, { "id": "Krishna1", "nick": "KK1", "values": [ "0" ], "function": "SUB", "numValue": [ "0" ] } ], "anotherTag": [], "TagTag": { "tt": "tttttt", "tt1": "tttttt" } } { "id": "Krishna", "nick": "KK", "values": [ "0" ], "function": "ADD", "numValue": [ "0" ] }
{ "sometag": {}, "where": [ { "id": "Krishna", "nick": "KK", "values": [ "0" ], "function": "ADD", "numValue": [ "0" ] }, { "id": "Krishna1", "nick": "KK1", "values": [ "0" ], "function": "SUB", "numValue": [ "0" ] } ], "anotherTag": [], "TagTag": { "tt": "tttttt", "tt1": "tttttt" } } { "id": "Krishna1", "nick": "KK1", "values": [ "0" ], "function": "SUB", "numValue": [ "0" ] }
SELECT 2
mydata value
{ "sometag": {}, "where": [ { "id": "Krishna", "nick": "KK", "values": [ "0" ], "function": "ADD", "numValue": [ "0" ] }, { "id": "Krishna1", "nick": "KK1", "values": [ "0" ], "function": "SUB", "numValue": [ "0" ] } ], "anotherTag": [], "TagTag": { "tt": "tttttt", "tt1": "tttttt" } } { "id": "Krishna", "nick": "KK", "values": [ "0" ], "function": "ADD", "numValue": [ "0" ] }
SELECT 1
array_elem
{"id": "Krishna", "nick": "KK", "values": ["0"], "function": "ADDITION", "numValue": ["0", "1"]}
{ "id": "Krishna1", "nick": "KK1", "values": [ "0" ], "function": "SUB", "numValue": [ "0" ] }
SELECT 2
jsonb_agg
[{"id": "Krishna", "nick": "KK", "values": ["0"], "function": "ADDITION", "numValue": ["0", "1"]}, {"id": "Krishna1", "nick": "KK1", "values": ["0"], "function": "SUB", "numValue": ["0"]}]
SELECT 1
jsonb_set
{"where": [{"id": "Krishna", "nick": "KK", "values": ["0"], "function": "ADDITION", "numValue": ["0", "1"]}, {"id": "Krishna1", "nick": "KK1", "values": ["0"], "function": "SUB", "numValue": ["0"]}], "TagTag": {"tt": "tttttt", "tt1": "tttttt"}, "sometag": {}, "anotherTag": []}
SELECT 1