Data dodania Pytanie
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
2017-09-21 17:09 How to reject deserialization of unrecognized with JSON-B »
I am attempting to migrate the implementation details of some JSON databinding code to use the Java EE 8 JSON-B APIs instead of Jackson. In order to ...
(0) odpowiedzi
2017-09-21 15:09 Postgresql unique constraint for jsonb array »
I am new to postgresql. I want to make the unique constraint in jsonb array. I need to save data in given formats {"data":[{"lan_id":"da315627-3ece-2...
(0) odpowiedzi
2017-09-20 00:09 How to query jsonb array of hash elements for missing key/value pair in Rails 5/Postgres »
I have a jsonb array attribute (array_attr) on a class (Klass) in my Rails 5 app. The array is an array of hashes. Some of the hashes contain keys tha...
(1) odpowiedzi
2017-09-19 08:09 How to Store List of Java Objects/Json into Postgres Jsonb using JPA? »
How do we define List of objects into postgres 9.6 jsonb data type using JPA? I'm trying to put list of products into order table's products column wh...
(0) odpowiedzi
2017-09-18 11:09 How to query PostgreSQL nested JSONB in deeper level? »
I'm new to JSON/JSONB datatypes and I'm having some problems selecting the JSONB elements from deeper levels. Here is an example table: CREATE TABLE...
(1) odpowiedzi
2017-09-17 16:09 How do you pass json to a parameterized sql statement using psycopg2? »
What's the correct syntax to pass json into a parameterized SQL statement? How do you safely pass a variable into the json along with it? I ha...
(0) odpowiedzi
2017-09-16 23:09 Using Bookshelf to execute a query on Postgres JSONB array elements »
I have a postgres table with jsonb array elements and I'm trying to do sql queries to extract the matching elements. I have the raw SQL query running ...
(1) odpowiedzi
2017-09-16 21:09 Postgres query records where any element in array of objects in JSONB field contains number > or < x »
I've searched around but this seems to be a more unique requirement for querying JSONB fields than is common and haven't found a solution yet. My tabl...
(1) odpowiedzi