jsonb Questions
3
Solved
Hibernate 5 does not support the PostgreSQL jsonb data type by default.
Is there any way to implement jsonb support for Hibernate + Spring JPA?
If there is a way, what are the pros and cons of us...
4
Solved
For versions less than 9.5 see this question
I have created a table in PostgreSQL using this:
CREATE TEMP TABLE jsontesting
AS
SELECT id, jsondata::jsonb FROM ( VALUES
(1, '["abra","value","man...
Whitewash asked 14/2, 2017 at 18:23
2
Solved
How do I get all the empty records for a jsonb column with Active Record ?
Pooch asked 8/6, 2016 at 8:56
4
Solved
I have the following jsonb. From the array pages I would like to remove the element called 'pageb'. The solutions offered in similar questions are not working for me.
'{
"data": {
"id": "a1aldjf...
Ewan asked 5/3, 2019 at 10:2
3
Solved
I have a table 'Documents' which has a column 'Tags' with 'jsonb' datatype.
Sample data in Tags column
[{"Tag": "Social Media"}, {"Tag": "Adobe Creative"}]
[{"Tag": "Interactive"}]
[{"Tag": "...
Nitrobenzene asked 19/10, 2016 at 5:5
3
Solved
In an example table:
CREATE TABLE example (
id SERIAL PRIMARY KEY,
data JSON NOT NULL );
INSERT INTO example (id, data) VALUES
(1, '[{"key": "1", "value": "val...
Simba asked 31/5, 2021 at 8:59
2
Solved
How can I recursively flatten a nested jsonb in postgres which I don't know the depth and the field at each depth? (see example below)
A postgressql query to do the flattening would be much apreci...
Huppert asked 9/8, 2017 at 8:30
4
Solved
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 first column is an integer and the second is a json ...
Julienne asked 18/8, 2016 at 5:34
5
Solved
Using the || operator yields the following result:
select '{"a":{"b":2}}'::jsonb || '{"a":{"c":3}}'::jsonb ;
?column?
-----------------
{"a": {"c": 3}}
(1 row)
I would like to be able to do a...
Merca asked 22/3, 2017 at 7:7
7
I have the following postgresql rows as JSONB row:
{age:26}
And I would like to replace it so that that i looks like this:
{age: 30, city: "new york city"}
How can I do this in postgressql? S...
Charkha asked 31/10, 2016 at 17:43
1
Solved
I assumed to have a jsonb column header_format in my PostgreSQL table (which turns out to be type json[], really) .
A column value looks like this:
{"{\"label\":\"SUPPLIER\&quo...
Luxe asked 6/10, 2022 at 6:28
2
Solved
I am trying to query a certain value in a Postgres database. I have a field named groups in the users table that can be represented in either of these ways:
1.
groups: {"data"=>[{"serie"=>5...
Donate asked 20/11, 2016 at 10:10
2
Solved
I have the following Controller
@RequestMapping(value = "/update/{tableId}", method = RequestMethod.PUT, produces = MediaType.APPLICATION_JSON_VALUE,
consumes = MediaType.APPLICATION_JSON_VALUE)
...
Maritsa asked 7/6, 2020 at 13:27
3
Solved
In PostgreSQL 9.5, is there a way to rename an attribute in a jsonb field?
For example:
{ "nme" : "test" }
should be renamed to
{ "name" : "test"}
Belfort asked 17/2, 2017 at 22:53
4
I'm using sequelize (v3.12.2), with pg (4.4.3), PostgreSQL (v9.4), and Node (v4.1.2).
I have a model that inlcudes a JSONB data type field.
var User = {
data: {
type: Sequelize.JSONB
}
Now I ...
Phosphorous asked 20/10, 2015 at 16:12
2
Solved
Having a hard time traversing and querying elements from a jsonb[] row.
CREATE TABLE foo (
id uuid PRIMARY KEY,
work_experience jsonb[] NOT NULL
);
INSERT INTO foo (id, work_experience)
VALUES (...
Blackandwhite asked 8/4, 2022 at 22:26
1
I am using the JSONField for my Django model for JSON type but in the background, it makes my attributes column type JSONB which I don't want to do here because it breaks my exact order of JSON'S i...
Continuity asked 24/9, 2021 at 15:7
2
Solved
I have data which uses JSON as tagged unions, such that a top-level object contains just one child object. The type of the child object depends on its key-name in the parent, not a separate "tag" f...
Armandarmanda asked 24/7, 2017 at 12:23
2
Solved
I am trying to speed up the querying of some json data stored inside a PostgreSQL database. I inherited an application that queries a PostgreSQL table called data with a field called value where va...
Cystolith asked 11/2, 2022 at 20:35
3
I have a Go struct which contains a slice of strings which I'd like to save as a jsonB object in Postgres with GORM.
I've come accross a solution which requires to use the GORM specific type (post...
Roydd asked 6/2, 2020 at 10:28
3
Solved
I'm using PostgreSQL 9.4 with a table teams containing a jsonb column named json. I am looking for a query where I can get all teams which have the Players 3, 4 and 7 in their array of players.
T...
Bibb asked 17/3, 2015 at 19:37
2
Solved
I need to globally replace a particular string that occurs multiple places in a nested JSON structure, thats stored as jsonb in a postgres table. For example:
{
"location": "tmp/config",
"altern...
Hotheaded asked 8/12, 2017 at 19:12
2
Solved
How to convert integer[] to jsonb?
declare ids int[];
declare jsonids jsonb;
jsonids := array(select id from student); -- what should I do here?
Caboose asked 17/2, 2022 at 15:16
3
Solved
If I convert a text value like {"a":"b"} to JSONB and then back to text a space () is added between the : and the ".
psql=> select '{"a":"b"}'::jsonb::text;
text
------------
{"a": "b"}
(1 r...
Genetic asked 11/6, 2020 at 12:4
3
Solved
How to fetch compact JSONB from PostgreSQL?
All I got when fetching is with spaces:
SELECT data FROM a_table WHERE id = 1; -- data is JSONB column
{"unique": "bla bla", "...
Flintshire asked 16/12, 2014 at 12:56
© 2022 - 2025 — McMap. All rights reserved.