Data dodania Pytanie
2017-05-12 07:05 Append only jsonb column in Rails + Postgres »
Is anyone using Rails 4.x or Rails 5.x and the Postgres (9.4+) jsonb column? I understand the benefits of using jsonb + Postgres - you get to mix sche...
(1) odpowiedzi
2017-05-11 19:05 Postgresql - json update key of object in array »
I have the following json in my database: [ {"schedule_id":1,"datetime":"2017-05-12 00:00:00","status":"available"}, {"schedule_id":2,"dateti...
(1) odpowiedzi
2017-05-11 13:05 In Postgres 9.6, what's the simplest way to expand a jsonb column filled with simple json dicts? »
Say, I have a table json_table with a jsonb column json_field. Each element in this column is a single uncomplicated dict, e.g., {'first_field': 2 , ...
(2) odpowiedzi
2017-05-09 17:05 indexing jsonb arrays and query jsonb array »
[{"id": "345", "categoryid": "2", "products": ["23", "45","34"]}] [{"id": "2343", "categoryid": "3", "products": ["123", "455"]}] [{"id": "12", "cate...
(0) odpowiedzi
2017-05-09 10:05 PostgreSQL - return jsonb keys in one column »
I have the query to search for ids in jsonb column, the array can contain many id's. Say I have data like this id | act | act_id | ...
(2) odpowiedzi
2017-05-09 08:05 PostgreSQL - Where In JSONB »
I'm having a hard time querying jsonb data. I'm not used to dealing with jsonb types in postgres . Is it possible to do a WHERE IN on a jsonb field? ...
(2) odpowiedzi
2017-05-08 20:05 postgresql - key/value lookup to json object »
Running Postgres 9.6. So I have this key/value lookup table which establishes the deepest child value of a huge JSON object. Given a table of this s...
(1) odpowiedzi
2017-05-05 03:05 SQL, rails: check if the JSONB column in my record has a key-value pair »
No, this is just an example not a dating app for pets. My app is different and more complex. I have a rails app. I have 2 tables House and Pet. A Ho...
(1) odpowiedzi
2017-05-04 21:05 Building query in Postgres 9.4.2 for JSONB datatype using builtin function »
I have a table schema as follows: DummyTable ------------- someData JSONB All my values will be a JSON object. For example, when you do a select *...
(1) odpowiedzi
2017-05-03 08:05 How to push a JSON object to a array in jsonb column in postgresql »
I m new in using jsonb in postgresql. I have a following structure [ { "Id":1, "Name":"Emilia" ...
(2) odpowiedzi
2017-05-02 15:05 Postgres and jsonb - search value at any key »
Is possible to look for a given value at any key in a JSONB column in Postgres? In the documentation I can't see any example. Example value at a JSON...
(2) odpowiedzi
2017-05-01 03:05 Approaches to dynamically assemble PostgreSQL jsonb queries without string concatenation »
I would like to query a jsonb column in a PostgreSQL databse from a Java / Spring Boot application. The structure of the jsonb documents is not known...
(1) odpowiedzi
2017-04-29 16:04 Postgresql JSONB inline sum of array values »
I am trying to figure out what the query syntax is for an inline sum for a specific field in an object array. My data is structured like this CREATE ...
(2) odpowiedzi
2017-04-24 11:04 How to use BETWEEN in postgres jsonb? »
I have some jsonb data like: { "id":"58fd893414a570155ddf5120", "TPDId":"10101", "Services":[ "10093" ], "DaysInstances":[ ...
(2) odpowiedzi
2017-04-20 14:04 Search in jsonb and array combination in postgres with rails4 stored_accessor »
I have a model called Event, where I have stored_accessor "list" (stored like data: {"list"=>[{"key"=>"key1", "value"=>"value1"}]}). I need...
(1) odpowiedzi
2017-04-20 12:04 jsonb_agg: Avoid objects wrapped with "jsonb_build_object" »
I can create JSON objects using jsonb_build_object the way I want them. E.g. SELECT jsonb_build_object('id', id) FROM (SELECT generate_series(1,3) id...
(1) odpowiedzi
2017-04-20 11:04 Update every value in an array in postgres json »
In my postgres database I have json that looks similar to this: { "myArray": [ { "myValue": 1 }, { ...
(1) odpowiedzi
2017-04-19 19:04 Using PostgreSQL, how do I escape "\" in json columns? »
I'm using Postgres 9.5 and I have a column ("info") of type 'json'... I'm trying to do this insert: INSERT INTO table ( info ) VALUES ( '{"entry":"...
(1) odpowiedzi
2017-04-18 10:04 Compare 2 array members count in jsonb »
Have table with columns (User_ID, A_D). A_D column is jsonb. User_ID | A_D 1 | "{"agreements": [1, 7], "disagreements": [13]}" 2 | "{"disagreements"...
(2) odpowiedzi
2017-04-16 12:04 PostgreSQL Loop jsonb rows in 2 recordsets and find change »
I am a novice in PostgreSQL world, and not aware about its offerings much. I have a requirement where I have to find changes in values in 2 recordsets...
(0) odpowiedzi
2017-04-14 13:04 PostgreSQL searching value in inside JSON array »
I want to search element inside JSONB in PostgreSQL here is my JSON CREATE TABLE test AS SELECT jsondata::jsonb FROM ( VALUES ( '{"key1": 1, ...
(2) odpowiedzi
2017-04-12 23:04 Concat object to array if object does not exits »
mycolumn is a jsonb type with a default value of an empty array. I would like to update this array if the new value is not already present. select q...
(3) odpowiedzi
2017-04-12 21:04 How can I implement full-text search on a jsonb column with Postgres? »
I have a table that stores a conversation between two people. The data will look something like this: CREATE TABLE foo AS SELECT $$[ { "user":...
(0) odpowiedzi
2017-04-11 01:04 Postgres 9.6 - Unique constraint on array of JSONB key for "contains" operator »
We have a Postgres (9.6) table my_table with a row email_address jsonb[] NOT NULL: DROP TABLE my_table; CREATE TABLE my_table (email_address jsonb NO...
(0) odpowiedzi
2017-04-06 18:04 Best PostgreSQL datatype for storing key-value maps? »
I'd like to store a simple map of key-value strings as a field in my PostgreSQL table. I intend to treat the map as a whole; i.e, always select the en...
(1) odpowiedzi
2017-04-06 12:04 Searching for a particular value in a jsonb datatype prostgresql »
We are storing dynamic json data to a postgresql jsonb datatype field. Most of the json keys are dynamic and nested. Now I need to search one partic...
(0) odpowiedzi
2017-04-05 18:04 PostgreSQL JSON quick search (search value in from any key) »
I try to find solution for quick search functionality within PostgreSQL JSONB column. Requirements is that we can search for value in any JSON key. T...
(0) odpowiedzi
2017-04-05 11:04 PostgreSQL tagging using JSONB? »
I am implementing tagging for an image gallery. I am already using JSONB in places where I can, and I'd like to know if JSONB would be appropriate for...
(0) odpowiedzi
2017-04-05 02:04 Postgres 9.6 - Create unique index for json array »
'Sup, We have a Postgres (9.6) table myTable with a row data jsonb NOT NULL: DROP TABLE myTable; CREATE TABLE myTable (data jsonb NOT NULL); We wa...
(0) odpowiedzi
2017-04-01 22:04 Rails Order Model By Nested Attributes in JSONB field »
I have a Campaign model that has a conversion rate listed like this: campaign.quota_data["raw_quota_data"][0]["Conversion"] = 33 I'd like to do some...
(1) odpowiedzi
2017-03-31 10:03 Postgresql, jsonb query help is needed »
I am very, very embarrassed. But I need a help with my query, thanks in advance. My jsonb (jsonb array) is [ { "id_contact":2, ...
(1) odpowiedzi
2017-03-30 12:03 Querying nested JSON arrays in PostgreSQL »
I am currently experimenting with the JSON functionality PostgreSQL. While queries of nested key-value pair objects are very easy to query, I am havin...
(1) odpowiedzi
2017-03-29 23:03 Update jsonb column »
I'm trying to update user facts inside of a column in a Postrgres db in the form designated here. jsonb currently in data column and waiting to be up...
(1) odpowiedzi
2017-03-29 07:03 Using & Searching through jsonb data in mysql »
We previously had PostgreSQL database setup and were using JSONB to hold some of our data in json since we need to keep one of our columns data dynami...
(1) odpowiedzi
2017-03-29 00:03 Json aggregation of data with missing values »
I have a simple table of supplements create table consumption ( account bigint not null, date date not null, supplement text not null che...
(1) odpowiedzi