Data dodania Pytanie
2017-06-29 21:06 Insert Array of JSONB with Sqlalchemy in postgresql »
I have an issue with inserting array of JSONB in postgresql. The issue is related to Issue with Sqlalchemy and inserting array of jsonb to postgresql ...
(0) odpowiedzi
2017-06-28 07:06 Full-text search on content of complex jsonb »
I have pretty complex jsonb column with nested arrays and objects. And I need to perform full-text search on it. Example of json: { "buyer": { "e...
(0) odpowiedzi
2017-06-24 09:06 How to fix keys in a jsonb field »
I have a table with one jsonb field. I want that field to have onlye three keys, say the table schema is name: string dob: date personal_data: jsonb ...
(1) odpowiedzi
2017-06-23 02:06 jsonb LIKE query on nested objects in an array »
My JSON data looks like this: [{ "id": 1, "payload": { "location": "NY", "details": [{ "name": "cafe", "cuisine":...
(2) odpowiedzi
2017-06-21 16:06 PostgreSQL - GROUP_CONCAT for JSONB column »
I try to find a way to concat JSONB values using Postgres. For example I have two lines : INSERT INTO "testConcat" ("id", "json_data", "groupID") V...
(2) odpowiedzi
2017-06-18 19:06 query for ids inside JSONB using jsonb_each and LATERAL in postgres »
Imagine a super simple table such as: create table object ( id INT, data jsonb ); With some data: INSERT INTO object (id, data) VALUES (...
(2) odpowiedzi
2017-06-17 13:06 postgres jsonb array index »
I have created a model in loopback with 3 properties connected to postgres. Among the properties defined, I have one array property. My model is defin...
(0) odpowiedzi
2017-06-16 19:06 Using Postgres jsonb type to store array of values vs collection of key/value pairs »
I have a jsonb type column named selection in a postgres database. I can store the document in it as { 'selection': ['foo', 'bar'] } or just ['foo'...
(1) odpowiedzi
2017-06-16 10:06 How to dynamically select variable data columns from variable tables when the columns and the tables are dependent on stored data? »
Using Django 1.10, Python 3.5, I have stored various information about the columns and tables I want to use to extract data in another table called s...
(0) odpowiedzi
2017-06-15 02:06 how to use temp data in where clause »
I have following temp table in sql, which i want to filter data from jsonb data. Usually, I use inner join to filter data with temp table. however, I...
(0) odpowiedzi
2017-06-14 14:06 Postgresql 9.4 - Invalid input syntax when converting to JSONB »
I've made a simple function to update a jsonb with new values: CREATE OR REPLACE FUNCTION jsonupdate( IN "pJson" jsonb, IN "pNewValues" jsonb) ...
(1) odpowiedzi
2017-06-13 23:06 How can I do less than, greater than in JSON Postgres fields? »
If I have some json: id = 1, json = {'key':95} id = 2, json = {'key':90} id = 3, json = {'key':50} Is there a way I can use Postgres fields to quer...
(2) odpowiedzi
2017-06-11 20:06 How can I append a given key to a PostgreSQL JSONB array? »
I have a JSONB store. requests: { "0000": ["1111"], "1111": ["2222"] } I can add into the store just fine when I have an initial value with: UP...
(1) odpowiedzi
2017-06-07 22:06 stringify/casting jsonb to string w/reliable whitespacing for hash in postgresql similar to JSON.stringify »
I'm looking to create a hashing function for jsonb fields, but need to control the casting to string to allow for client and server integrity. In othe...
(0) odpowiedzi
2017-06-06 18:06 How can I merge an existing jsonb field when upserting a record in Postgres? »
Say I have a table on Postgres with a jsonb column containing {"a": 1, "b": 2}. Now I'd like to upsert a record with the same id and {"b": 10, "c": 20...
(2) odpowiedzi
2017-06-05 23:06 AR Query for jsonb attribute column »
I'm using Postgres for my db, and I have a column in my Auction model as a jsonb column. I want to create a query that searches the Auction's json col...
(2) odpowiedzi
2017-06-02 20:06 Update a value for each jsonb object in array of objects PostgreSQL »
I apologize if this is a duplicate question. I've looked at the answers here: How do I modify fields inside the new PostgreSQL JSON datatype? and here...
(0) odpowiedzi
2017-06-02 12:06 Is GIN index on postgres jsonb column nested? »
I have a json which I am storing it as jsonb in postgres. { "name": "Mr. Json", "dept":{ "team":{ "aliases":["a1","a2","a3"], "te...
(1) odpowiedzi
2017-05-29 15:05 What jsonb type would be better (jsonb or jsonb[] array)? »
I have a field in my database in which I store the details which is an array [{ "id": "16d94b2b-d0e6-49dd-90a9-8acd323b19fa", "name": "Pollo parme...
(0) odpowiedzi
2017-05-26 21:05 Querying dataset by conditions in nested JSONB document »
I have a fairly simple table in PostgreSQL database (v 9.6): CREATE TABLE foobar (id serial, data jsonb); Here is an example of JSONB document that...
(2) odpowiedzi
2017-05-25 19:05 How to aggregate rows of jsonb elements in postgres? »
I want to know if there is any efficient way to aggregate several rows of a JSONB column, consider this table structure: PERFORMANCE(user_id INTEGER...
(1) odpowiedzi
2017-05-24 20:05 PostgreSQL: get value of object inside jsonb array for full text search »
How do I get a certain value based on a key inside an object that is part of my array? I store my json data as jsonb inside my Postgres 9.6 DB addres...
(1) odpowiedzi
2017-05-24 17:05 Postgres select where in json array containing json »
I have a table in a postgresql 9.4 database with a jsonb field. Some example rows: [{"name": "145119603", "numberOfCarrot": 2}] [{"name": "188459553...
(1) odpowiedzi
2017-05-24 06:05 rails: query JSONB column with regular expression »
I am trying to match a JSONB object with a regular expression. I have a rails app (not the same as this one). I have 2 tables House and Pet. A House ...
(0) odpowiedzi
2017-05-23 22:05 Increase performance of GROUP BY in postgres jsonb fields »
I'm trying to get jsonb performance to match that of a joined table that consists of the same data. So far so good, but I'm stuck on the following gro...
(0) odpowiedzi
2017-05-23 19:05 postgresql - query to build up json »
Running: PostgreSQL 9.6.2 I have data stored in a table that is in the form of a key/value pair. The "key" is actually the path of a json object, ea...
(1) odpowiedzi
2017-05-22 19:05 Serialize/Deserialize list of POJOs using Jackson to/from JSONB column - Postgres 9.4 »
I have created a custom UserType for my class and want to map the list of POJOs to JSONB column in the database. Added JSONB column to my table A...
(0) odpowiedzi
2017-05-22 16:05 How to get all records with a jsonb field timestamp that matches Sunday or Saturday? »
I want to extract all records that match start_date field in json column request to fall in either Saturday or Sunday. tried this Foo.where("extract...
(1) odpowiedzi
2017-05-22 08:05 Querying Postgres JSONB column by key with dynamic values »
I have model UserPost which has JSONB column posts and the data stored in that will be JSON having user_id as the key (dynamic) and some attributes as...
(1) odpowiedzi
2017-05-19 14:05 Query from list of lists from JSON field »
I have a table in postgresql, which contains JSON list, each element of is also a list (it could be dictionary though I decided to make it list or tup...
(1) odpowiedzi
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