Data dodania Pytanie
2017-01-11 04:01 Postgresql - distinct values from jsonb array »
I have the following jsonb array column (tags) |name | tags (jsonb) | -------------------------------- |john | [ "foo", "bar" ] |smith| [ "bar", "b...
(1) odpowiedzi
2017-01-10 19:01 PostgreSQL - is jsonb_set() performance O(1)? »
I am building a social network, and trying to implement a data structure for saving time line event ids for each user. I was inspired by Redis Twitter...
(1) odpowiedzi
2017-01-10 07:01 comparing 2 values of json array element in where clause »
Here is my scenario. I have my application installed on a computer. I have an environment variable which tells me which drive the application is insta...
(0) odpowiedzi
2017-01-05 11:01 PostgreSQL json(b) - Convert string to array & update field »
I have a jsonb field in PostgreSQL with the following content: { "object": { "urls": "A;B;C" } } What I want to do is update the value of urls insid...
(1) odpowiedzi
2017-01-05 08:01 Issue with Sqlalchemy and inserting array of jsonb to postgresql »
So i'm trying to insert an array of jsonb values into my database but I can't seem to format it right, here's my code: updated_old_passwords.append({...
(0) odpowiedzi
2017-01-04 15:01 How to COPY CSV as JSON fields »
Is there a way to COPY the CSV file data directly into a JSON or JSONb array? Example: CREATE TABLE mytable ( id serial PRIMARY KEY, info jS...
(1) odpowiedzi
2017-01-02 21:01 Return element of jsonb field with activerecord select »
How do I 'select' a value from within a jsonb stored field? e.g. @model1: data: {"special_date" => "Wed, 16 Mar 2016 11:20:20 -0700", ....} @mo...
(2) odpowiedzi
2017-01-01 10:01 Find and update a collection in JSONB »
I have a Rails 5.0 app with a JSONB column called data, which contains an array of hashes: [ {'event': 'web_session', 'user_id': 1, 'count': 13},...
(0) odpowiedzi
2016-12-28 02:12 How to loop through jsonb array of objects to get values of keys within objects Postgres »
I am using Postges 9.4 and I have a table that has a jsonb field as an array of objects. Here is a sample field: [{"pk": 224, "arbitrary_value": 50,...
(1) odpowiedzi
2016-12-23 01:12 PostgreSQL jsonb_set not working »
update table set json = jsonb_set(json, '{field}', array_to_json(array_append(array(select * from jsonb_array_elements_text(json->'array')), '1')),...
(1) odpowiedzi
2016-12-22 23:12 How to retrieve messages from a given date using Jsonb? »
I have the following table: CREATE TABLE tbl (tbl_id int, messages jsonb); CREATE INDEX index_tbl ON tbl USING gin (messages); And the JSON message...
(1) odpowiedzi
2016-12-22 14:12 What is the best alternative for the following situation? »
I'm using a JSONB field in my Postgresql database to store the following document. I own thousands of documents. I need to create reports with this da...
(2) odpowiedzi
2016-12-20 07:12 How to find the minimum value in a postgres sql column which contains jsonb data? »
I have a table t in postgres database. It has a column data which contains jsonb data in the following format (for each record)- { "20161214": {"4"...
(2) odpowiedzi
2016-12-19 10:12 How to find the key for the minimum value in jsonb column of postgres? »
I need to find the key of the minimum value in a jsonb object,I have found out minimum value, need to find the key of the same in the same query. Que...
(1) odpowiedzi
2016-12-17 02:12 Postgres coalesce to empty JSONB array »
How can I coalesce a null column into an empty JSONB array? This doesn't work: SELECT jsonb_array_elements(coalesce(null_column, '{}'::jsonb)) FROM t...
(1) odpowiedzi
2016-12-14 15:12 JPA native query mapping POJO class with JSONB value on PostgreSQL »
I was trying to retrieve joined values from multiple tables into a custom POJO using a native query. One of the values I want to retrieve is a JSONB f...
(1) odpowiedzi
2016-12-13 22:12 How can I get the distinct values of all columns in a single table in Postgres? »
Ideally I'd like to run a single query that returns a table where each row is a column name of a specified table, and jsonb array of all the distinct ...
(2) odpowiedzi
2016-12-11 21:12 PostgreSQL jsonb nested pattern matching text search across multiple rows »
as stated in the title, I am attempting to do a query that preforms a full text search on multiple rows, agains a jsonb data type, with nested data, t...
(1) odpowiedzi
2016-12-09 13:12 Postgresql JSON index strange query time »
Let's say we have table like this: CREATE TABLE user_device_infos ( id integer NOT NULL DEFAULT nextval('user_device_infos_id_seq1'::regclass), u...
(0) odpowiedzi
2016-12-09 12:12 sorting data by "value" from jsonb_each(), is reliable? »
Given jsonb type column and data structure like this: { "1": 10000.2, "2": 77.2, "3": -200.09, "4": 12.55 } Need retrieve result from this ...
(1) odpowiedzi
2016-12-08 16:12 Improve ranking times on multiple JSONB fields search in PostgreSQL »
My search times are actually quite fast now but as soon as I start to rank them for the best results I hit a wall. The more hits I get, the slower it ...
(0) odpowiedzi
2016-12-08 13:12 Index for ranking JSONB search results in PostgreSQL »
I'm currently optimizing my search results on jsonb fields of PostgreSQL. I'm using Postgres 9.6. My ultimate goal is to search on multiple fields wit...
(1) odpowiedzi
2016-12-07 17:12 Why are Postgres lookups on jsonb columns so slow? »
I have a table targeting that has a column marital_status of type text[] and another column data of type jsonb. The content of these two columns is th...
(0) odpowiedzi
2016-12-06 18:12 Java json string to Serializable »
I'm meeting this problem. I'm using PostgreSQL with a column whose type is jsonb in a table. After Hibernate mapping, it come to Serializable. I got ...
(0) odpowiedzi
2016-12-06 06:12 Unknown duplicates from querying a nested JSON »
I would like to do text search in a JSON object in a table. I have a table called Audio that is structured like below: id| keyword | transcript | us...
(1) odpowiedzi
2016-12-05 13:12 Postgresql query very slow when selecting a key from a JSONB field object »
When including a key from the object stored in my body JSONB field the query is running ~100ms slower than without the field in the select: SELECT id...
(1) odpowiedzi
2016-11-30 12:11 postgresql, jsonb field, array append via jsonb_set and jsonb_array_length »
I have postgresql with jsonb field that always contains array. I need to append new values to that array or update already existing values by index. ...
(1) odpowiedzi
2016-11-28 17:11 Index for searching nested JSONB array elements in PostgreSQL »
I'm fairly new to postgres and currently using 9.6. When trying to implement a full text search in postgres using it's jsonb documents I noticed slow ...
(1) odpowiedzi
2016-11-28 09:11 Database design for multiple offers - postgres 9.5 »
I have a booking system which currently supports a single discount for each reservation. I want to extend that and support multiple offers per reserva...
(0) odpowiedzi
2016-11-22 04:11 Is JSONB a good choice for numerical data? »
I have a system producing about 5TB of time-tagged numeric data every year. The fields tend to be different for each row, and to avoid having heaps of...
(0) odpowiedzi
2016-11-20 17:11 How can I search object values inside an array with Postgres jsonb? »
I'm using PostgreSQL 9.5 and the JSONB data type to store documents. My table something like this: create table records ( id serial, data jsonb )...
(1) odpowiedzi
2016-11-18 23:11 How to get and compare the elements of the jsonb array in Postgres? »
Postgres 9.6.1 CREATE TABLE "public"."test" ( "id" int4 NOT NULL, "packet" jsonb, ) WITH (OIDS=FALSE) ; Jsonb {"1...
(1) odpowiedzi
2016-11-16 17:11 Save from params to JSONB datatype column using Postgres »
I'm kinda new working with JSONB datatype column and I'm having some trouble saving the data the way I'd like to my database in Ruby on Rails. I'd ...
(0) odpowiedzi
2016-11-16 09:11 Is ISO8601 the best date-format for PostgreSQL jsonb when i want to filter by the date? »
I'm new to PostgreSQL and I have the following question: I have a table with just an id-column and a data-column, which uses the jsonb-type. Inside t...
(2) odpowiedzi
2016-11-16 08:11 Search for a json array in jsonb column having data as json array in posgresql »
I have a jsonb column(gppermission) in my table doc which contains data as [{"Deny": "true", "Allow": "false", "GroupName": "Group 1 "}, {"Deny": ...
(1) odpowiedzi