Data dodania Pytanie
2016-11-04 02:11 How to join jsonb array elements in Postgres? »
I am using Postgres 9.5, and I have the following tables: Users id UUID name TEXT Images id UUID key TEXT width INTEGER height INTEGER Posts ...
(1) odpowiedzi
2016-11-01 19:11 Spring Data Rest - PATCH Postgres jsonb field »
The short version is: How to patch the JSON object contained in a Postgres jsonb field using Spring Data Rest PATCH method? Here comes the long versi...
(0) odpowiedzi
2016-11-01 02:11 Json containment query »
I have a Postgres table containing json column like below: select * from jsontest; id | jbag ----+...
(1) odpowiedzi
2016-11-01 00:11 Why is this query taking so long on JSONB Gin index field? Can I fix it so it actually uses the index? »
Recently we changed the format of one of our tables from using a single entry in a column to having a JSONB column in the format of ["key1","key2","ke...
(1) odpowiedzi
2016-10-31 18:10 postgresql: jsonb update multiple keys in one query »
I have the following postgresql rows as JSONB row: {age:26} And I would like to replace it so that that i looks like this: {age: 30, city: "new yo...
(0) odpowiedzi
2016-10-31 17:10 Postgresaql (psycopg2) containment of jsonb: get all that do not have key field »
I have data that looks like this in jsonb format in postgresql: [ {assumed_title: "Moon Landing", "episode": 10}, {assumed_title: "Something else"} ]...
(0) odpowiedzi
2016-10-31 16:10 How can I create a custom hibernate dialect for the PostgreSQL jsonb operators? »
PostgreSQL added the ability to query json/jsonb type columns with operators like this: SELECT * FROM user u WHERE customerInfo @> :foo where cu...
(0) odpowiedzi
2016-10-27 21:10 PostgreSQL count results within jsonb array across multiple rows »
As stated in the title, I am in a situation where I need to return a count of occurrences within an array, that is within a jsonb column. A pseudo exa...
(1) odpowiedzi
2016-10-27 15:10 Remove jsonb array element by value »
I did figure out how to remove a value from an array for a single record, but how to do it for many of them. The problem is in the way how I use the s...
(3) odpowiedzi
2016-10-26 23:10 Why is this query taking so long? How can I fix it? Postgres 9.4 »
Recently we changed the format of one of our tables from using a single entry in a column to having a JSONB column in the format of ["key1","key2","ke...
(0) odpowiedzi
2016-10-26 11:10 Get all JSON keys efficiently on PostgreSQL »
Having a table create table tbl(data jsonb) I can select all keys that match a certain pattern from any object in the data column using select key...
(0) odpowiedzi
2016-10-25 07:10 Postgres select where jsonb array contains one or more elements in another array »
I've got a postgres column 'data' which is jsonb in this format: { 'tags': ['friend','enemy','frenemy'] ... // other data } Say I want to selec...
(1) odpowiedzi
2016-10-22 16:10 Query for exact json keys match in Postgresql (Exacly these keys) »
I'm trying to query after rows that contain a the keys ['kommune', 'fylke', 'år'] in a jsonb columns named data_filters. As far as i can see postgre...
(1) odpowiedzi
2016-10-21 23:10 Django PostgreSQL JSONField db_index error »
My model: from django.db import models from django.contrib.postgres.fields import JSONField class MyModel(models.Model): data = JSONField(blank=...
(1) odpowiedzi
2016-10-21 20:10 PostgreSQL JSONB Index for matching exact int key »
I have a table with column "times" that contain simple object { key(int): value(int), ... } { 1: 100, 2: 200, 3: 200, ... } Keys ar...
(0) odpowiedzi
2016-10-19 07:10 Select value of jsonb column in PostgreSQL »
I have a table 'Documents' which has a column 'Tags' with 'jsonb' datatype. Sample data in Tags column [{"Tag": "Social Media"}, {"Tag": "Adobe Cr...
(1) odpowiedzi
2016-10-19 01:10 Rails Postgres filtering for a jsonb object inside of a jsonb array »
Let's say I have a model Neighborhood that has a jsonb[] field families, which is an array containing json objects with any type of key value pairing ...
(1) odpowiedzi
2016-10-18 13:10 Indexing nested json with Postgres »
We have a table with a jsonb field with content like this: {"terms": { "foo": { "uri": "foo" }, "bar": { "uri": "bar" } } } We wou...
(1) odpowiedzi
2016-10-14 16:10 Save a Time object in JSONB »
I have a JSONB field in my database defined like this: t.jsonb :some_data, null: false, default: [] I've tried to save time objects to this field ...
(0) odpowiedzi
2016-10-14 12:10 Postgres: Range Query on nested jsonb column »
I am using postgres 9.5.4. From below sample json data stored in jsonb column, I would like to search records matching o['mid'] > 7000 This is s...
(1) odpowiedzi
2016-10-12 07:10 select or extract all key values inside a jsonb data in postgres »
I have a jsonb column in my postgres table and data is populated and stored in it. Here is a sample format of data that is stored in the jsonb column...
(1) odpowiedzi
2016-10-11 20:10 Wildcards in JSONB »
Looking for a wildcard operator to query JSONB data types. For example with this: $> Campaign.find(43).style_item_map {"0"=>{"items"=>[876,...
(1) odpowiedzi
2016-10-07 06:10 Get unique records where column type is JSONB »
I have a complicated Postgres query I'm trying to make, mainly because my columns / data is in the JSONB type. I need to get all records where Auth...
(1) odpowiedzi
2016-10-04 13:10 PostgreSQL create index in JSON array element »
I'm working with PostgreSQL 9.5, and I want to create an index for multiple fields of a JSON object. I'm showing two examples, the first one is workin...
(0) odpowiedzi
2016-10-03 19:10 Speed up insert of json into Postgresql »
Does it make sense to set the type of a column to text instead of jsonb when inserting a lot of records and change it back afterwards? I'm assuming Po...
(0) odpowiedzi
2016-10-03 17:10 Insert JSON string into Postgres and return field »
I want to insert a JSON string into a Postgres table with a jsonb field and want the insert query to return a part of the JSON. For example, I want to...
(1) odpowiedzi
2016-10-03 05:10 ActiveRecord constructs incorrect SQL when using JSONB/Hash with Array »
I am using jsonb datatype for a column named data. When I query using a simple hash, it works correctly: [1] pry(PredictionService)> Prediction.wh...
(1) odpowiedzi
2016-10-01 18:10 Storing array data in jsonb field with Rails and Postgresql »
Say I have a Car model in which I want to display different kinds of data. I add a data column to the table: class AddDataToCars < ActiveRecord::M...
(1) odpowiedzi
2016-09-29 20:09 Jooq custom binding registration in Java »
I have a custom binding written to convert from custom type to Postgres json type. This part of the documentation mentions how to register using xml ...
(1) odpowiedzi
2016-09-28 02:09 Postgres jsonb 'NOT contains' operator »
I'm experimenting with postgres jsonb column types, and so far so good. One common query I'm using is like this: select count(*) from jsonbtest WHE...
(0) odpowiedzi
2016-09-27 20:09 How do I query a complex JSONB field in Django 1.9 »
I have a table item with a field called data of type JSONB. I would like to query all items that have text that equals 'Super'. I am trying to do thi...
(1) odpowiedzi
2016-09-27 13:09 Querying Postgres Table with JSONB data »
I have a Table which stores data in a JSONB column. Now, what i want to do is, query that table, and fetch records, which have specific values for a ...
(1) odpowiedzi
2016-09-26 21:09 Check if an object key appears twice in a json array of objects »
Given a jsonb array that looks like this: [ { "type": "foo", "desc": "example" }, { "type": "foo", "desc": "second example" }, { "type": "bar...
(2) odpowiedzi
2016-09-26 08:09 Postgres custom operator priority over built in? »
I recently wrote a blog post about creating a custom minus operator for PostgreSQL's JSONB type. Basically, an operator was created like this: CREA...
(1) odpowiedzi
2016-09-23 12:09 create partial index for postgresql jsonb field »
I am trying to add a partial index to postgresql jsonb column. The jsonb column is named: email_provider. I have tried adding a partial index on the c...
(1) odpowiedzi