Data dodania Pytanie
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-06-02 10:06 Query average point each student »
I have 2 tables: Student: id name 2 ABC 13 DEF 22 GHI Semester: id student_i...
(3) odpowiedzi
2017-06-01 19:06 Getting array aggregate of all modes for a group by result »
I have a bunch of ~600k rows of let's say owner's names (varchar) and pet type (also varchar). For each owner's name I'd like an array with the most f...
(2) odpowiedzi
2017-06-01 19:06 postgres is running, but I am not able to uninstall it »
So I originally downloaded PostgreSQL 9.4.10-1. The problem is I am trying to use Vagrant and Virtual Box, however Vagrant defaults to using port 5432...
(0) odpowiedzi
2017-06-01 11:06 postgres transform 2 columns as json with array »
I have next resultset from Postgres data base : actually I never work with postgres json and I naven't found any same examples id | another_id ------...
(2) odpowiedzi
2017-06-01 09:06 How to lock certain columns from being edited for a user in postgresql »
How to lock certain columns from being edited even though user have access to editing rights for the table in postgresql. ...
(2) odpowiedzi
2017-05-31 17:05 Postgres resource usage stats and configs »
I'm using postgres server 9.4. From pg_admin or psql tool, I can do SHOW ALL; this will give me the config of postgres server. For example shared_bu...
(1) odpowiedzi
2017-05-31 13:05 convert postgresql query to Native Query »
I want to convert the below postgresql query to hibernate query or any type of query that supports in java WITH RECURSIVE tree(parent, idElement) AS...
(1) odpowiedzi
2017-05-31 11:05 Why do I see the postgres process when I run top although it is running only inside Docker? »
I have a Docker instance running Postgres and Postgres is not installed on the host machine. However, if I run top on the host machine I can see sever...
(1) odpowiedzi
2017-05-31 06:05 Unable to connect to database from rails console on dockers »
I have my rails project setup on Digitalocean using Dockers. This is my docker-compose.prod.yml file. version: "2" volumes: db-data: external: f...
(1) odpowiedzi
2017-05-31 03:05 Postgres hash index with unique constraint »
With Postgres 10 properly supporting hash index, I would like to use hash index for id lookup (hash index is smaller in size compared to btree and the...
(1) odpowiedzi
2017-05-30 23:05 Postgres: ¿How to use an array as variable? »
I have this .sql script: DO $$ DECLARE user_list integer[] = (select user_id from user where state = 'ACTIVE'); BEGIN CREATE CREATE MATERI...
(1) odpowiedzi
2017-05-30 18:05 Why ruby sort array of strings differently than sql order (postgres)? »
When the code would tell better than words: [4] pry> Models::Company.order(:name).select_map(:name) => ["Dekker, Jacobs and Bosch", "Koster en ...
(1) odpowiedzi
2017-05-30 11:05 Group By records based on start date and end date with count Rails »
Suppose, its May 2017 and I want to get records of April 2017. My query fetches the record of April 2017 with count but I want to include empty date...
(3) odpowiedzi
2017-05-30 10:05 How to solve this error : ERROR: operator does not exist: character varying = integer »
I am a beginner in Java EE and spring. Actually I program an application and I spent several hours on an error that I can't correct. I want specify th...
(0) odpowiedzi
2017-05-30 00:05 How do I use Ruby, Sinatra, Mithril.js, Postgresql and Stripe to build SAAS application on Ubuntu? »
I am deploying an application written in Ruby which uses Mithril.js as SPA framework, Sinatra web server, Stripe for accepting payments and Postgresql...
(0) odpowiedzi
2017-05-29 20:05 real-time sync between local Postgres instance and Azure Cloud Postgres instance »
I need to set up real time sync process between a on premise postgresql instance with cloud postgresql instance. Please let me know what are all the o...
(1) odpowiedzi
2017-05-29 17:05 Postgres ERROR: row is too big »
psql (9.2.7) Type "help" for help. postgres=# \c dtb_dpx You are now connected to database "dtb_dpx" as user "postgres". dtb_dpx=# vacuum full; ERROR:...
(0) odpowiedzi
2017-05-29 17:05 Webpage crashes when loading jQuery DataTable - too many rows? »
I'm working on a management system website that consists of tables of data pulled from a Postgres database that is running on a server. I have been re...
(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-29 10:05 Node.js - PostgresSQL - could not determine data type of parameter $1 error »
I'm trying to create a PostgreSQL prepared statement using node.js pg npm package. However, I keep getting an error: could not determine data typ...
(2) odpowiedzi
2017-05-29 07:05 How to integrate foreign servers/tables in rspec tests for a Rails application? »
I'm having trouble trying to test some models for foreign tables in my Rails application. I'm not sure what is the best approach to include this model...
(0) odpowiedzi
2017-05-29 06:05 How to take the previous entries for an id »
I am having a database table in postgresql like below entry_no id time ________ ____ ______ 1 1 ...
(2) odpowiedzi
2017-05-28 22:05 Return all the rows for id's that have all three seq number present »
I have a table which looks something like this: table1 +----+-----+------+ | id | seq | test | +----+-----+------+ | 1 | 1 | HR | | 1 | 2 | ...
(2) odpowiedzi
2017-05-28 22:05 Why can't PostgreSQL do this simple FULL JOIN? »
Here's a minimal setup with 2 tables a and b each with 3 rows: CREATE TABLE a ( id SERIAL PRIMARY KEY, value TEXT ); CREATE INDEX ON a (value...
(1) odpowiedzi
2017-05-28 13:05 Knex:Error Pool2 - Error: The server does not support SSL connections »
Trying to connect with Postgres Node js and ran into the error Resource Wall is listening on port 8080 Knex:Error Pool2 - Error: The server does no...
(1) odpowiedzi
2017-05-28 04:05 Self joining a table n times »
I'm trying to find a biological "find core genome of a given set of organisms" problem. Essentially, given a list of organisms, find all genes that ar...
(1) odpowiedzi
2017-05-27 14:05 Using NULL in WHERE clause »
(Note: I'm not asking how to compare a column with NULL.) I notice that in PostgreSQL if we do SELECT 42 WHERE NULL, the result set is empty. Therefo...
(2) odpowiedzi
2017-05-27 13:05 Scala, play - cannot insert into Postgresql database »
I have a simple scala and play code for inserting product into database. My database config in application.conf looks like: db.default.hikaricp.conn...
(2) odpowiedzi
2017-05-27 03:05 Using lag() for dynamic rows postgresql »
I have a table named 'quantity' as below Table 1 : ---------------------------------------------------- Price | A_Quantity | B_Quantity | Remaining_...
(1) 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-26 18:05 What is the fastest way to extract all n-grams of lengths 1, 2, and 3 from a body of text in PostgreSQL? »
I have many bodies of text, and for each of them, I want to extract all unigrams, bigrams, and trigrams (words, not characters) and insert the counts ...
(2) odpowiedzi
2017-05-26 11:05 Handle connection breakages in rails »
I have a module written in ruby which connects to a postgres table and then applies some logic and code. Below is a sample code: module SampleModule...
(1) odpowiedzi
2017-05-26 05:05 Window function to fill timeline gaps »
Data session time_interval activity c889ddb532e76c961c2944dd90b10142 2017-05-25 20:16:40 walking c889ddb532e76c9...
(2) odpowiedzi
2017-05-25 22:05 How to avoid race condition in updating model field to newest timestamp »
I need to keep track of the most recent time a user was mentioned in a post, and update this field each time a new post is created based on it's post ...
(1) odpowiedzi