Data dodania Pytanie
2017-11-07 09:11 Postgres Build Complex JSON Object from Wide Column Like Design to Key Value »
I could really use some help here before my mind explodes... Given the following data structure: SELECT * FROM (VALUES (1, 1, 1, 1), (2, 2, 2, 2)) AS...
(1) odpowiedzi
2017-11-06 20:11 Insert Attribute from jsonb to another column in Postgres table »
I have a table employe_record as follows: Column | Type | Modifiers -----------------+--------------------------+-----------...
(0) odpowiedzi
2017-11-01 22:11 PostgreSQL: Add object to jsonb array by function »
I'm having this jsonb array: [{"id": 1, "foo": false}, {"id": 1, "foo": true}] I have been struggling trying to add another field to all the objects ...
(1) odpowiedzi
2017-10-30 16:10 OR clause inside JSON query in Postgres »
In Postgres JSONB, is it possible to do something like this: where ( description ->'Auditor'->'1'->'Internal|External' is not null ) Ins...
(1) odpowiedzi
2017-10-30 09:10 select empty object in jsonb_each in postgres »
How to select a empty object Record with jsonb_each function. because I select some extra field with jsonb_each key and value. but when a all record j...
(1) odpowiedzi
2017-10-30 02:10 Order by the IN value with jsonb array »
I am trying to select records based on the order of array elements of another row: SELECT * FROM tester WHERE id IN ( SELECT jsonb_array_ele...
(1) odpowiedzi
2017-10-29 07:10 Detect if a jsonb attribute is array or object »
Many jsonb/json functions expect all values of the column either to be of type json array ( like jsonb_array_length ) or only an json object (like jso...
(1) odpowiedzi
2017-10-27 16:10 Postgresql 9.6: Query specific ranges of a JSONB array »
I use Postgresql 9.6 currently and been trying since hours to get the following solved in the most efficient way: My example table: id | data ------...
(1) odpowiedzi
2017-10-27 09:10 How can I do less than, greater than in JSON array object Postgres fields? »
I want to retrieve data by specific field operation it store array of object. i want to add new object in it. CREATE TABLE justjson ( id INTEGER, doc...
(1) odpowiedzi
2017-10-25 19:10 postgres join tables on jsonb column and a bytea column »
I have 2 tables. Table A has a column called artifact_references that is a jsonb column like so: [{'key': 'heuc3934ntueu', 'references': [{'...
(0) odpowiedzi
2017-10-24 13:10 Update json column with another json object postgres9.5 »
I have a table with structure id(int) | attributes (json) 1 | {"a":1,"b":2} I want to update attributes column with another json object {"b...
(1) odpowiedzi
2017-10-23 14:10 Query in Ecto embeds_many association »
Trying to experiment with Ecto embeds_many, and work great, until I need to query on some data in the embedded field. So I have something like a prod...
(1) odpowiedzi
2017-10-19 23:10 How to read json into interface using Apache Johnzon »
I'm creating a Johnzon jsonb mapper like: Mapper mapper = new MapperBuilder() // TODO .build(); To read the json I do: Cus...
(0) odpowiedzi
2017-10-19 19:10 flatten/concat-aggregate JSONB array »
I have a JSONB column that contains JSON arrays. I now need to get all distinct values from all rows into one single array. Input: id | values -----...
(1) odpowiedzi
2017-10-18 22:10 Getting row_number for from jsonb_array_elements or jsonb_to_recordset »
I'm doing a cross join lateral on an jsonb array and I'm looking to get the row_number (or its equivalent) for the array elements. looking at the row_...
(1) odpowiedzi
2017-10-18 01:10 Postgresql: How to perform LIKE query on a json array? »
I have a table with tags stored as a JSONB column. Like: id tags ---- ------------------------------ 1 ["red", "blue"] 2 ["orange", "light pi...
(1) odpowiedzi
2017-10-17 21:10 How to use PostgreSQL JSONB_SET() to create new deep object element »
I must be missing something... seems JSONB_SET() is not working as advertised? SELECT JSONB_SET( '{"k1": {"value": "v1"}}', '{k2,value}', ...
(1) odpowiedzi
2017-10-17 20:10 How to get index of an array value in PostgreSQL? »
I have a table called pins like this: id (int) | pin_codes (jsonb) -------------------------------- 1 | [4000, 5000, 6000] 2 | [...
(5) odpowiedzi
2017-10-17 14:10 Querying Postgres 9.6 JSONB array of objects »
I have the following table: CREATE TABLE trip ( id SERIAL PRIMARY KEY , gps_data_json jsonb NOT NULL ); The JSON in gps_data_json contains ...
(2) odpowiedzi
2017-10-16 23:10 Postgresql jsonb multiple lateral joins »
I'm very new to postgresql jsonb and am trying to setup a query without having to have multiple subqueries as I want this to be readable as much as po...
(0) odpowiedzi
2017-10-15 20:10 How does flask-sqlAlchemy deal with primary keys that are json? »
I am new to flask and sqlAlchemy. Any help will be great. I have my models as: class ReferentialDatum(db.Model): __tablename__ = 'referential_da...
(0) odpowiedzi
2017-10-14 15:10 Represent Postgres jsonb data as columns based on other source »
There is a table contacts with column contacts.custom::jsonb. Data there is in form of k=>v pairs: { "city": "London", "quantity": "500", "ans...
(0) odpowiedzi
2017-10-13 06:10 postgreSQL query empty array fields within jsonb column »
device_id | device 9809 | { "name" : "printer", "tags" : [] } 9810 | { "name" : "phone", "tags" : [{"count": 2, "price" : 77}, {"count": 3...
(1) odpowiedzi
2017-10-12 22:10 Postgresql jsonb traversal »
I am very new to the PG jsonb field. I have for example a jsonb field containing the following { "RootModule": { "path": [ 1 ], "tags": { ...
(1) odpowiedzi
2017-10-10 16:10 how to update JSONB column using knexjs, bookshelfjs »
I have a JSONB column in PostgreSQL database like {lat: value, lon: value}. I want to change any specific value at a time eg. lat, but I am not sure h...
(1) odpowiedzi
2017-10-10 09:10 Inner join with postgres array field »
We have a CMS using rails,react and postgresql. We have pages and pieces stored in our table. Each page consist of a set of pieces (An array field). ...
(1) odpowiedzi
2017-10-10 01:10 postgres index optimization jsonb »
I am on postgres 9.5. I have a table which is as below CREATE TABLE public.info ( metadata jsonb, state text, active boolean name tex...
(0) odpowiedzi
2017-10-06 20:10 How to use postgres jsonb operator '?' in laravel 5 »
I'm trying to run a query with jsonb ? operator https://www.postgresql.org/docs/9.6/static/functions-json.html. In database console its ok, but i can...
(0) odpowiedzi
2017-10-04 18:10 PostgreSQL - NoSQL query ideas to select one node of JSON »
I have this JSON on my database: { "Id": 1, "Questions": [ { "QuestionId": 6, "Description": "Question 1", ...
(1) odpowiedzi
2017-10-04 00:10 Using submodel accessor (STI) on parent params for nested forms »
i have the following models: class Order < ApplicationRecord class Bill < Order class Preorder < Order class Detail < ApplicationRecord ...
(1) odpowiedzi
2017-10-02 11:10 Migrating PSQL table to jsonb without null values »
I have to migrate table which contains key and multiple values in columns(nullable) into jsonb represented key value postgres table. K | V1 | V2 | V3...
(2) odpowiedzi
2017-09-29 16:09 Returning JSON from Postgres is slow »
I have a table in Postgres with a JSONB column, each row of the table contains a large JSONB object (~4500 keys, JSON string is around 110 KB in a txt...
(1) odpowiedzi
2017-09-29 05:09 Converting this text to jsonb? »
I have this text: ("{""A"":""0/000"",""B"":2}") I want to convert it to a jsonb like this: {"A":"0/000","B":2} How do I do this? ...
(1) odpowiedzi
2017-09-26 12:09 SQLAlchemy, there is not history of deleted state of JSONB field »
For example I have a model: class AttributeValue(db.Model): id = Column(Integer, primary_key=True) value = Column(JSONB(), nullable=False) ...
(1) odpowiedzi
2017-09-23 01:09 How to insert JSONB into Postgresql with Python? »
I am new to python and postgresql I've been battling just hardcoding each json line with python and I don't think this the scalable method. If someo...
(2) odpowiedzi