Data dodania Pytanie
2017-09-28 15:09 postgres, server closed the connection unexpectedly via VBS »
I get this error: "server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the requ...
(1) odpowiedzi
2017-09-28 15:09 Postgres lead window with a series index »
So I'm working with a table of instruments and their historic closing prices and I'm trying to match a day with an arbitrary number of days in the fut...
(0) odpowiedzi
2017-09-28 12:09 Sql function or bash script to get the memory usage of each query in postgres »
How to get memory usage and cpu utilization of of each query in postgres, I'm wondering if there is any sql function or script for the same ...
(1) odpowiedzi
2017-09-27 16:09 How to query for empty array in JSONB? »
Consider this example: postgres=# CREATE TABLE emptyarray (fields jsonb); ...
(1) odpowiedzi
2017-09-27 11:09 create a temp table with the output of a stored procedure in postgres »
I want a query to create a table with the output of a stored procedure function in Postgres. SQL: CREATE TEMP TABLE new_project AS select project_in...
(1) odpowiedzi
2017-09-27 05:09 Why can't I stop RDS instance? »
I spun up two RDS instances in the same VPC. Both are postgresql. While the m4.xlarge one has multi-AZ enabled and is encrypted. The t2.micro has e...
(1) odpowiedzi
2017-09-26 15:09 PostgreSQL using BitmapAnd instead of composite index »
I have table2 and I'm limiting my result by date range date_col and integer column col1. I get different plans between using BETWEEN and IN() for date...
(0) odpowiedzi
2017-09-26 12:09 Distinct in R while connecting to PostgreSQL using DBI Package »
The below code prints: SELECT "district_code" FROM sd_stage.table1 GROUP BY "district_code" but I am expecting: select distinct(district_code) f...
(1) odpowiedzi
2017-09-26 09:09 How to store ISO/IEC 19794-2 finger print template in postgreSQL database »
I am building one biometric authentication application. I have successfully generated the finger print template data in console. I am getting these te...
(1) odpowiedzi
2017-09-25 19:09 Difference between IS FALSE and = 'f' in Postgres and index use »
In Postgres 9.6, on a users table with around 12 million rows, where the active boolean column has a btree index on it. EXPLAIN ANALYZE SELECT * FRO...
(2) odpowiedzi
2017-09-25 19:09 Pass extra parameter to PostgreSQL aggregate final function »
Is the only way to pass an extra parameter to the final function of a PostgreSQL aggregate to create a special TYPE for the state value? e.g.: CREAT...
(2) odpowiedzi
2017-09-25 15:09 Draping UI over underlying Full Text Queries in website »
Just building a website, and the search part of it implements (on the back end) a full text search with PostGreSQL. Problem is: if the user puts space...
(0) odpowiedzi
2017-09-25 15:09 Force GIN index scan in postgresql 9.4 »
I'm having a table of locations(29 million rows approx) Table "public.locations" Column | Type| Modifiers ------------------------------------+...
(1) odpowiedzi
2017-09-24 12:09 Why PostgreSQL not using index properly? »
Schema: create table records( id varchar, updated_at bigint ); create index index1 on records (updated_at, id); Query. It iterates over...
(2) odpowiedzi
2017-09-24 12:09 Hibernate 5 mapping on a foreign key »
I am currently studying hibernate and i have the following postgresql table structures: CREATE TABLE tbl_secure ( plug_id bigserial NOT NULL, plu...
(1) odpowiedzi
2017-09-24 01:09 Add a Total Row and converting into percentages »
I have a database with information about people's work condition and neighbourhood. I have to display a chart of information in percentages like thi...
(2) odpowiedzi
2017-09-23 23:09 How do I generate a list of views dependent on a certain table in postgresql? »
I need to update a mapping table in postgresql, but of course it won't allow me to replace/drop the original table as there are dependencies. The er...
(0) odpowiedzi
2017-09-23 19:09 Getting "ERROR: relation PRIMARY already exists" with Aerogear Unified Post Server + Docker + Postgres »
I'm trying to get working a dockerized version of latest distribution of (1.2.0.Latest) Aerogear Unified Push Server (UPS) but using Postgres instead ...
(1) odpowiedzi
2017-09-23 15:09 Unenforced references in postgres functions? »
In postgres, When a table/view is updated (e.g. renamed) in a way that will break an existing reference, that reference is also be updated, or the ini...
(1) odpowiedzi
2017-09-23 06:09 Cannot insert question mark in postgres insert »
I'm trying to run a simple Postgres SQL insert: insert into "Resources" values(1, 'How are you?'); But the result after insert is: ID Data ...
(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-22 23:09 Select random value for each row »
I'm trying to select a new random value from a column in another table for each row of a table I'm updating. I'm getting the random value, however I c...
(2) odpowiedzi
2017-09-22 19:09 Connect to Postgres DB with Kerberos from Java/Windows7 »
I've looked everywhere and asked loads of people but no one is able to help me so far. I'm trying to connect to a postgres (9.6) database on a remote ...
(1) odpowiedzi
2017-09-22 13:09 Entity Framework entity is null but count is greater than 0 »
Very strange issue with EF6. I have a DbSet<T> property defined on the context. Let's just say T is Entity, so it looks like this: public virtu...
(0) odpowiedzi
2017-09-21 18:09 Adding hardcoded row in sql if value was not found by search »
So I have a table that goes something like this: And I have selects.... SELECT colors, COUNT (Num1) AS number1, COUNT (Num2) AS number2, COU...
(1) odpowiedzi
2017-09-21 11:09 Why Postgres SQL function scans partitions that it should not »
I have stumbled upon very weird issue with my SQL functions. They appear to have different execution plans between function language SQL and language ...
(1) odpowiedzi
2017-09-21 04:09 Convert bytea to double precision in PostgreSQL »
I have a database where one of the tables stores a blob (bytea) of all kinds of generic data collected from another system. The bytea field can have a...
(1) odpowiedzi
2017-09-20 11:09 Why is json_populate_record() not recognizing row type? »
I have 2 tables type and name. I am trying to insert into these with json_populate_record() through a function. Receiving the following error: first ...
(1) odpowiedzi
2017-09-20 08:09 Writing the content of a csv file to PostgreSQL with NPGSQL fails »
I am writing the Content of a csv file to a PostgreSQL table with help of NPGSQL in version 3.2.5. The content of my csv is the following id, value ...
(1) odpowiedzi
2017-09-20 04:09 Python/Flask: How to tell how long a user spends on a page? (Data entry/time log app) »
I have seen answers to see how long a user spends on a page using Javascript, but my knowledge of JS is lacking (much less integrating JS into my Pyth...
(1) 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 21:09 Month on month growth for a region and city »
I have a table in the below format - region country revenue datetime apac japan 1000 2002-01-01 apac china 2000 2001-02-01 ...
(1) odpowiedzi
2017-09-19 17:09 How to debug ShareLock in Postgres »
I am seeing quite a few occurrences of the following in my Postgres server log: LOG: process x still waiting for ShareLock on transaction y after 10...
(1) odpowiedzi
2017-09-19 15:09 Rails 5: can't order after group and count »
In my subscribers table I have duplicate emails, so I want to count these. I'm doing this in the Rails console: Subscriber.select("email, count(*)")....
(1) odpowiedzi
2017-09-19 11:09 postgres key is not present in table constraint »
When trying to ALTER TABLE in Postgres 9.5 to create foreign key constraint: from product_template.product_brand_id to product_brand.id ALTER TABLE ...
(1) odpowiedzi