Data dodania Pytanie
2016-12-22 10:12 No LazyInitializationException in controller »
On my project I'm using Spring Boot with Hibernate 5 and Postgresql 9.4. Now I'm facing a problem. I've got a @OneToMany relationship with LAZY fetchi...
(0) odpowiedzi
2016-12-21 15:12 Substring from an escape character onwards »
I'm using PostgreSQL and I need to truncate a text string, I need to show from an escape character (:) onwards. I'm trying something like that: SE...
(2) odpowiedzi
2016-12-21 11:12 Error trying to run pgAdmin4 »
I've installed postgresql 9.6 (using suggested linux installer) which comes with pgAdmin4, but getting a few errors. First, I had to change the folde...
(1) odpowiedzi
2016-12-21 11:12 Postgres Match All array values to same column with and condition »
I have table table_a with following columns id event_id 1 101 1 102 1 103 2 105 2 103 2 106 I want to search (101, 103) with and condi...
(1) odpowiedzi
2016-12-19 20:12 Apache Drill with Postgres jdbc connection password issue »
When password parameter contains "#"s - authentication fails. If I change the password to just [0-9a-Z] - it works great. Can I somehow char escape i...
(0) odpowiedzi
2016-12-19 19:12 Can we create a trigger to call another DB instance stored procedure? »
I'm trying to call the stored procedure which is in another PostgreSQL database instance of same server, but I couldn't able to call that. I'm using ...
(0) odpowiedzi
2016-12-15 17:12 pgagent - not running jobs - pgpass file is correct - postgresql »
I have Pgagent installed on my Debian OS. Along with Postgresql 9.4. I have checked .pgpass file as this seems to be the most common cause for a job...
(1) odpowiedzi
2016-12-15 11:12 Insert text with single quotes in PostgreSQL 9.4.3 »
Using this: Insert text with single quotes in PostgreSQL I run on Postgres version 9.4.3 with command sql after insert into test values (1,$$user's...
(0) odpowiedzi
2016-12-14 19:12 error using postgres UUID primary key with Hibernate »
I am developing a greenfield web app that uses Spring boot 1.4.1 - which uses spring 4.3.3 & Hibernate 5.2.3.Final under the hood. We are using P...
(0) odpowiedzi
2016-12-14 11:12 Postgres Match All array values to same column with and condition »
I have table table_a with following columns id event_id 1 101 1 102 1 103 2 105 2 103 2 106 I and to search (101, 103) with and condit...
(2) odpowiedzi
2016-12-13 06:12 Dynamic Localisation of Data models and workflows Using ROR and Postgres »
I am designing data models for my API services using Ruby on Rails and postgres. The application is supposed to handle complicated workflows and model...
(0) odpowiedzi
2016-12-12 15:12 How to reset all sequences to 1 before database migration in PostgreSQL? »
(PostgreSQL 9.4) I am in the process of migrating an older database to a new schema. After using pg_restore to acquire the new schema (without data) ...
(2) odpowiedzi
2016-12-07 17:12 Why are Postgres lookups on jsonb columns so slow? »
I have a table targeting that has a column marital_status of type text[] and another column data of type jsonb. The content of these two columns is th...
(0) odpowiedzi
2016-12-07 16:12 Postgres failover Error »
We are testing Postgres failover. After the primary brought down, I 'touch' the trigger_file as instructed. The slave now becomes the primary. Test in...
(0) odpowiedzi
2016-12-07 11:12 Running different versions of postgresql side by side »
I have postgresql 9.3 installed. I would like to have also postgres 9.6.1 installed. Each application is using a different DB. Most of the times I do...
(1) odpowiedzi
2016-12-02 16:12 Updating a time-stamp field in a PostgreSQL function using LOCALTIMESTAMP fails »
When I call this line outside of a Postgresql function both the status and last_updated feilds are updated. UPDATE data.listings_applications SET sta...
(0) odpowiedzi
2016-12-02 09:12 Configure trigram and custom search with pg_search in rails »
I implemented a search using pg_search gem on rails 4. Casecommons When I, for example, searching word "programming" - it works fine, and when searc...
(0) odpowiedzi
2016-12-01 11:12 JPA - How to set the value in additional column of the join table »
I have two entities Groups , Users DB tables groups, users groups_users (join table having four columns namely gid, uid , createdate, isdel...
(0) odpowiedzi
2016-12-01 10:12 PostgreSQL Function Syntax Error in DECLARE clause »
I am unable to create this function as I get syntax error near INTEGER in line 6. Am I missing something here? CREATE OR REPLACE FUNCTION public.upda...
(2) odpowiedzi
2016-12-01 02:12 PostgreSQL Slow query, Order by LIMIT »
List item mydbab=# \d+ table1; Table "dbmydb.table1" Column | Type | Modifiers | Scol5rage | Stats target | Descri...
(1) odpowiedzi
2016-11-30 00:11 postgres jsonb with issues »
I am trying to build a query that will go into a table. Grab some data from within a jsonb column and then query against that data further. WITH id_l...
(1) odpowiedzi
2016-11-28 23:11 Return query result from postgresql conditionally »
I am trying to write function that should return records based on my input parameter. Structure will differ based on input. Here is something similar ...
(0) odpowiedzi
2016-11-25 16:11 Cast decimal real to double precision produces strange behavior »
I'm trying to cast a decimal real to double precision and it has the following behavior: select 2.2::real::double precision; Outputs: 2.2000000476...
(1) odpowiedzi
2016-11-25 11:11 Deleting rows which do not have entries in another table as foreign keys takes ages to run »
There are two tables - image and box Table image has a primary key - id - which has a reference in the box table as image_id I have archived some ro...
(0) odpowiedzi
2016-11-24 09:11 Does Postgres support virtual columns? »
ALTER TABLE formation ADD p varchar(20) GENERATED ALWAYS AS (DAT_FM -> '$.position') VIRTUAL; ALTER TABLE formation ADD c decimal(12,3) GENERATED A...
(0) odpowiedzi
2016-11-22 22:11 Postgres locks within a transaction »
I'm having trouble understanding how locks interact with transactions in Postgres. When I run this (long) query, I am surprised by the high degree of...
(1) odpowiedzi
2016-11-22 10:11 After compiling pgpool-II-3.5.2 can't find /usr/lib/postgresql/9.5/lib/pgpool_recovery »
There are no librays and no folders in /usr/lib/postgresql/9.5/lib/ from pgpool-II-3.5.2 after install/compile. I can't copy files from ~/pgpool-...
(0) odpowiedzi
2016-11-21 12:11 Which postgresql index types suitable for XML data type »
Postgresql has 4 types of index which are btree (default), hash, GIN and GIST. Which index type suit most for the following scenarios: search XML d...
(0) odpowiedzi
2016-11-18 13:11 How can I get a CIDR from two IPs in PostgreSQL? »
In PostgreSQL, I can get the upper and lower boundary of a CIDR-range, like below. But how can I get the CIDR from two IP addresses (by SQL) ? e.g. ...
(1) odpowiedzi
2016-11-16 16:11 How to get distinct array elements with postgres? »
I have an array with duplicate values in postgres. For example: SELECT cardinality(string_to_array('1,2,3,4,4', ',')::int[]) as foo => "foo"=>"...
(1) odpowiedzi
2016-11-16 12:11 Function call in postgresql returns no resultset »
I have a postgresql function like create or replace function getalltypes(name character varying(100)) returns setof docs as $BODY$ begin perform c...
(1) odpowiedzi
2016-11-16 08:11 Search for a json array in jsonb column having data as json array in posgresql »
I have a jsonb column(gppermission) in my table doc which contains data as [{"Deny": "true", "Allow": "false", "GroupName": "Group 1 "}, {"Deny": ...
(1) odpowiedzi
2016-11-15 18:11 How to install and run postgress using docker-compose.yml version "1" »
1: docker-compose.yml postgres96: image: postgres:9.6 ports: - "5432:5432" volumes: - ./Postgres/data:/var/lib/postgresql/data env: ...
(1) odpowiedzi
2016-11-15 06:11 PostgreSQL text array - query as integer, ignoring non-digits »
I have a table of people. Each person can have several regnums (mostly integers but some like M/2344 and W345). To make things a bit more complicated,...
(1) odpowiedzi
2016-11-14 22:11 Postgresql equivalent syntax for FORALL »
Please share the equivalent syntax for the below statement in postgresql FORALL i IN 1..20 INSERT INTO emp2 VALUES (enums(i)); ...
(1) odpowiedzi