Data dodania Pytanie
2017-12-09 21:12 Unpivot PostgreSQL large number of columns? »
I am trying to unpivot a large dataset, with 250 columns. There is a very good documented solution here unpivot and PostgreSQL. However, it inputs th...
(1) odpowiedzi
2017-12-09 15:12 Postgresql jsonb default insert value with dynamic timestamp »
I have a status column in my postgres database with the type jsonb I can prepopulate the json with something like this. CREATE TABLE ... status js...
(1) odpowiedzi
2017-12-08 18:12 How to use inputs for key value hash attributes in rails view? »
I have Schedule model with jsonb(hash) fields. create_table :schedules do |t| t.jsonb :monday t.jsonb :tuesday t.jsonb :wednesday t.timestam...
(1) odpowiedzi
2017-12-04 09:12 how to query nested array JSON in postgres? »
I have following structure of JSON document storing in one of my POSTGRES table link to the sample JSON is here here in that JSON , i have below s...
(0) odpowiedzi
2017-11-29 21:11 postgres JSONB: check if all keys *contained by* an array »
the postgres doc says that i can use ?& to check if a JSONB object's keys contains all elements in an array. is there something for me to check if...
(1) odpowiedzi
2017-11-29 11:11 Postgres query to fetch records from table having a column of type Array of Objects »
I have a table having two properties called id and categoryArray where id is of type number and categoryArray is a jsonb[] column and schema is as men...
(0) odpowiedzi
2017-11-28 20:11 Creating GIN index on ILIKE postgres query »
I am using postgres 9.6. I store JSONB data in one column and I would improve performance of one query. In my json data I have name column which is te...
(1) odpowiedzi
2017-11-28 10:11 How to create jsonb instance should I need to add any jar file? »
How to create jsonb instance should I need to add any jar file? I have created instance of jsonb in java class but getting error JsonbBuilder ca...
(0) odpowiedzi
2017-11-27 06:11 jsonb_set pass variable value instead of static in procedure »
Need help to get jsob_set working under PostgreSQL procedure, Fetching records from child table and updating parent table's json fields value. Assign...
(0) odpowiedzi
2017-11-23 12:11 Postgresql update json data property »
I created a field name is result and type is text. I just want to update 'lat' in column. When I use this query I get syntax error. How can I do? Th...
(1) odpowiedzi
2017-11-21 23:11 JSONB or Array of Ints »
I have a column in my database where I would like to store something called external_ids. So my table kinda looks like id (int, pk..) name (text...)...
(1) odpowiedzi
2017-11-21 18:11 How to add elements to array in jsonb by key (postgresql) »
This query SELECT '{"a": 1, "b": [{"x": "y"}]}'::jsonb || '{"b": [{"a": "b"}]}'::jsonb returns "{"a": 1, "b": [{"a": "b"}]}" But I need "{"a": ...
(0) odpowiedzi
2017-11-21 04:11 Optimal approach for large bulk updates to indexed bit sets »
The environment for this question is PostgreSQL 9.6.5 on AWS RDS. The question is about an optimal schema design and batch update strategy for a tabl...
(1) odpowiedzi
2017-11-20 16:11 Postgresql - SQL to Update a JSONB column type »
I have a table which has a column named "data" of type JSONB. I am trying to come up with a SQL statement to accomoodate the recent model changes. (po...
(0) odpowiedzi
2017-11-20 13:11 How to speed up nested JSON query in PostgreSQL? »
For our development of a flight retail engine we store orders as JSON documents in a PostgreSQL database. The order table is defined as: CREATE TABL...
(1) odpowiedzi
2017-11-18 16:11 Postgres filter nested jsonb object in select »
For ex I have a table like this, exclusive is jsonb column I want to select: Total number of case goinside = 1 Total Number of case type = 1, 2, 3 g...
(1) odpowiedzi
2017-11-17 23:11 Postgres - Update Attribute of JSONB type colum »
I have a table which has a column named "data" of type JSONB. I am trying to create a migration script based on the recent model changes. (postgres 9....
(0) odpowiedzi
2017-11-17 17:11 Wildcard when Traversing JSONB Array in Postgres »
We're currently trialing JSONB as a data type for order data in a system we're building. As the document is fairly large, Here is the first part of it...
(1) odpowiedzi
2017-11-15 05:11 SELECT CASE null for jsonb? »
I have a jsonb called data. I have to check if data->>'id' is null. If its null then we set to a boolean variable called hasid to false and vi...
(0) odpowiedzi
2017-11-14 01:11 How to join nested jsonb array elements? »
My question is somewhat similar to this one: How to join jsonb array elements in Postgres? But I have some nested arrays I need to fill in. To keep i...
(2) odpowiedzi
2017-11-13 19:11 How to update a JSONB object with a parent in postgresql »
I have a database with a table foo containing a column id and a column data with the following data: { "startDate":"2017-07-04", "endDate":"201...
(2) odpowiedzi
2017-11-12 14:11 How to cast a JSON value to its correspondent datatype? »
JSON-string is SQL-text, JSON-number is SQL-numeric, JSON-boolean is SQL-boolean... So I can do "real good cast"... But: SELECT to_jsonb('hello'::tex...
(1) odpowiedzi
2017-11-08 17:11 Using Jooq with jsonb_agg on postgreSQL without code generator? »
I would like to use Jooq with jsonb_agg in order to create jsonb objects I can read as a stream. Is there a way to do this without having Jooq look a...
(1) odpowiedzi
2017-11-08 11:11 How to get the data from jsonb using hql query »
I have in my database a column that called "info" from a type of jsonb that looks like this: info={'duration','metrics'} I want to use a hql query ...
(0) odpowiedzi
2017-11-08 10:11 How to insert empty array into jsonb column (pgsql) by Yii2? »
Created a migration with a new field of jsonb type, not null and default value = []. (example of stored data: ["235", "214"]) and add a rule to model...
(2) odpowiedzi
2017-11-07 21:11 Laravel Eloquent - having problems updating JSON col in PostgreSQL »
Part 1: Main Question On my colours_tab table (PostgreSQL 9.6), I have a column called colours_json_col of type JSONB. I have the following code in m...
(1) odpowiedzi
2017-11-07 15:11 Postgres, function "jsonb_extract_path_text" gives no result »
I want to use function "jsonb_extract_path_text", but it gives no result. I started with Hibernate and CriteriaBuilder, but eventually I simplified my...
(1) odpowiedzi
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