Data dodania Pytanie
2017-09-01 10:09 last given value before a specific date from a JSONB-column »
I want to get the last given value before a specific date(in this case 2015-09-30) from a BD with on id and 2 JSONB-column that looks like this: 1, ...
(1) odpowiedzi
2017-09-01 07:09 Postgres: Why do smaller JSON documents take more disk space than a larger ones? »
I am testing how much storage space JSON documents, stored as JSONB in Postgres 9.6.4, would take for our application. The tests produced odd results...
(0) odpowiedzi
2017-08-31 09:08 Counting the occurrences of distinct values in a column »
I have the following query: select jsonb_build_object('high', count(*) filter (where total = 'High')) || jsonb_build_object('medium', count(...
(1) odpowiedzi
2017-08-30 15:08 PostgreSQL - grouping by jsonb column »
I have survey_results table which has following columns: id - integer score_labels - jsonb score_labels column data format looks like this: {"tot...
(1) odpowiedzi
2017-08-30 14:08 Search for value at a specific time in jsonb i postgres »
I'm trying to pick out a value at a specific time from a jsonb column in postgres and tried to apply the answer from this tread but can't make it work...
(0) odpowiedzi
2017-08-28 18:08 How to load data as nested JSONB from non-JSONB postgres tables »
I'm trying to construct an object for use from my postgres backend. The tables in question look something like this: We have some Things that essenti...
(1) odpowiedzi
2017-08-28 16:08 jsonb-search to only show the spec value »
I found most of you questing in this tread but I have problem to get the right bit out of my query, The jsonb-column looks like this: [ {"price": 6...
(1) odpowiedzi
2017-08-28 16:08 Rails jsonb search in all attributes »
I have a jsonb field in my postgres database that contains some user info, and I have a search box in my app which query the jsonb field, if for examp...
(0) odpowiedzi
2017-08-25 17:08 Accessing current row values in a trigger »
I created a function will insert a value into a json for each row inserted in a table. But when I execute the insert, it says me that the column does...
(1) odpowiedzi
2017-08-24 08:08 How to extract a specific object inside an jsonb column using postgres »
My Jsonb column looks something like this: table name:jsonb and column name:json_test [ { "run_id": "EXE20170822172151192", "user_id": "12...
(1) odpowiedzi
2017-08-23 21:08 @JsonIgnore field in frontend UI and include it in Jsonb json serialization to store in Postgres »
I need a field to be ignored in front end UI, whereas the same field will be calculated in backend and needs to get stored in Postgres DB as a Jsonb o...
(1) odpowiedzi
2017-08-22 06:08 How to make Odoo support to Postgres JSONB field »
PostgreSQL supports NoSQL feature with JSONB. How can I use it in odoo? ...
(1) odpowiedzi
2017-08-21 11:08 How to use the key of jsonb in postgresql as a row value? »
I have a table like this: id (serial) | data (jsonb) 1 | {"a": 1, "b": 2} 2 | {"a": 3, "b": 1} how to convert it to this table:...
(1) odpowiedzi
2017-08-19 15:08 PostgreSQL JSONB versus keeping a separate table »
I'm thinking through a database design and I was wondering if anyone could chime in. I have some structured data that I will occasionally be filtering...
(0) odpowiedzi
2017-08-18 06:08 Accepts nested attributes safe params with jsonb and variable keys »
I am attempting to allow parameters to go through my controller for a data attribute that is of type jsonb, the hash looks like so: data: { "en" =...
(1) odpowiedzi
2017-08-17 17:08 Creating custom user types for jsonb columns in hibernate postgresql »
I am trying to migrate my spring mvc project database from mongodb to postgresql. Spring version 4.3.8.RELEASE Hibernate version 5.2.10.Final Postgres...
(0) odpowiedzi
2017-08-16 08:08 Querying an array within an array with Postgres JSONB query »
I have some JSON in a field in my Postgres 9.4 db and I want to find rows where the given name is a certain value, where the field is named model and ...
(1) odpowiedzi
2017-08-15 23:08 How to pass value from temp table to jsonb query in psql »
I have following temp table with just one row of data in psql idx | state| dir ----+-------+---------- 1 | TX | 123 I need to pass this ...
(0) odpowiedzi
2017-08-15 14:08 Searching jsonb column by array of value »
In my Ruby on Rails project I have SurveyResult model with the following scope: class SurveyResult < ActiveRecord::Base scope :with_purpose, -&g...
(1) odpowiedzi
2017-08-14 20:08 How to implement full text search on complex nested JSONB in Postgresql »
I have pretty complex JSONB stored in one jsonb column. DB table looks like: CREATE TABLE sites ( id text NOT NULL, doc jsonb, PRIMARY KEY...
(0) odpowiedzi
2017-08-14 20:08 How to write this query using active record query interface? »
I have products table with jsonb type specs column. One of the keys in this json is brand. I can successfully run query like this: SELECT specs -&gt...
(1) odpowiedzi
2017-08-13 16:08 Extract and expand Postgres JSON column data into separate table »
There is a Postgres 9.6 table with these columns: targettable ------------------------------------------------------------------ id | name | jsonbda...
(1) odpowiedzi
2017-08-09 10:08 recursively flatten a nested jsonb in postgres without unknown depth and unknown key fields »
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 ...
(1) odpowiedzi
2017-08-09 10:08 Rails - Use jsonb instead of associations. How to integrate it in nested forms? »
Say there's a users table with column 'other_details' as jsonb datatype. There are different types of users. other_details contain many details which ...
(0) odpowiedzi
2017-08-08 22:08 Using dynamic schema with postgres »
I have to decide how I want to implement dynamic schema. I will try to put some more description where my problem is. I use the postgres DB in lates...
(0) odpowiedzi
2017-08-08 10:08 How to select data from jsonb column? »
I have got one column with type jsonb. The data in this column looks as below { "random_number1": { "random_number2": { ...
(1) odpowiedzi
2017-08-05 00:08 Query for exact match of jsonb column in Rails 5 and PostgreSQL »
In my Rails 5 app with a Postgres database, I have a model Post with jsonb column called comments. The default value for comments is {}. I would lik...
(1) odpowiedzi
2017-08-04 20:08 Access a JSONB array of objects as an object of arrays »
I have a JSONB column in my Postgres 9.6 database with roughly the following structure [ { "A": "some value", "B": "another value", "fo...
(1) odpowiedzi
2017-08-03 12:08 Postgres jsonb_set multiple nested fields »
I have DB table with a jsonb column that has an entity, with nested child entities. Let's say we have: SELECT jsonb_set('{"top": {"nested": {"leaf" :...
(1) odpowiedzi
2017-08-02 14:08 Postgres Multiple Joins »
Not an expert on SQL but I managed to get this query working and delivering the results I need. The trick is to get it performing. The two tables in q...
(1) odpowiedzi
2017-07-31 21:07 Search for jsonb concatenated values specified by keys »
I have jsonb data as : id | data 1 | {"last": "smith", "first": "john", "title": "mr"} 2 | {"last": "smith jr", "first": "john", "title": "mr"} 3 ...
(1) odpowiedzi
2017-07-30 18:07 Difference between Postgres JSONB, HStore and wide-column database »
As I know, Postgres supports 2 datatypes named jsonb and hstore respectively. With those datatypes, programmers allow to have a dynamic schema databas...
(0) odpowiedzi
2017-07-28 19:07 Math calculating with two JSONB keys in Postgres? »
I have JSONB column with data like: {"plays": {"win": 90, "draw": 8, "lose": 2}} How I can calculate sum with win and draw keys? Something like: ...
(2) odpowiedzi
2017-07-27 20:07 Spring JPA Sorting and Paging with PostgreSQL JSONB »
I am using Spring JPA in order to manage my PostgreSQL data. This data makes heavy use of the jsonb data type in PostgreSQL 9.4. My table (called job...
(0) odpowiedzi
2017-07-26 23:07 How do I query for empty jsonb arrays in Postgres, Activerecord, Rails 5 »
I have a Post model with the column defined by the following migration: add_column :posts, :comments, :jsonb, default: [] add_index :posts, :comment...
(1) odpowiedzi