Data dodania Pytanie
2017-01-16 10:01 Creating TEMP TABLE dynamically in Postgresql and selecting the same table in FOR loop. But getting the error near PIPE symbol »
do $xyz$ declare y text; i record; begin y := to_char(current_timestamp, 'YYYYMMDDHHMMSS'); raise notice '%',y; execute 'CREATE TEMP TABLE someNewTabl...
(1) odpowiedzi
2017-01-13 13:01 How to fetch the ids in a column where multiple columns are repeated »
I have a table like the next: TABLE 1 ------- ID Integer COLUMN_1 Text COLUMN_2 Text COLUMN_3 Integer How could I fetch the ids in...
(3) odpowiedzi
2017-01-11 13:01 symfony create database index with lower function »
How can I declare in Doctrine an index for postgresql like: CREATE INDEX index_name_city_hotel ON booking_hotels(lower(name) text_pattern_ops, city_ho...
(0) odpowiedzi
2017-01-10 20:01 Generate 2d array with given values »
I'm trying to turn a 1d jsonb array [1, 2] into 2d array where its elements are repeated 3 times (the result can be in jsonb) [[1, 1, 1], [2, 2,...
(1) odpowiedzi
2017-01-09 12:01 How to get data from 2 tables based on search keyword rails »
I have 2 tables schools and private_schools and they are not related to each other. What I need to do is to search the data from both tables to popula...
(3) odpowiedzi
2017-01-08 20:01 Postgresql stores timezone information in TIMESTAMP WITH TIMEZONE? »
I'm trying to understand how PostgreSQL handles TIMESTAMP WITH TIMEZONE type, and I 'm running into the discrepancy between theory and practice. Acco...
(1) odpowiedzi
2017-01-06 19:01 I want to get an array of users whose last name begins with 'x' using the Rails console »
I have tried such things as: users=User.where :conditions => "last_name LIKE ?" "%X" and users=User.where("last_name.each_char.first = 'X'") and u...
(1) odpowiedzi
2017-01-04 07:01 How to sum all columns value of a table and display the total in new row by using Postgresql »
I am using normal select query to display all rows SELECT type, debit, credit, (debit-credit) as balance from bank_cash_registers ...
(2) odpowiedzi
2017-01-03 08:01 How to install Secondary Postgres Plus server on same Linux machine »
I already have a primary Postgres server installed in /opt/PostgresPlus . Now i'm trying to install a secondary server on same linux machine using ppa...
(0) odpowiedzi
2016-12-31 03:12 PostgreSQL 9.4: Concatenate column values of two distinct rows into one single row with that column »
I have three tables: 1) Politics CREATE TABLE politics ( "idPolitician" integer NOT NULL, "publicName" character varying(150) NOT NULL, "completeNam...
(0) odpowiedzi
2016-12-30 08:12 Getting the list of Objects and the corresponding value in Postgres (JSON data) »
I have the following JSON data which has an array of Objects PRODUCTION -> KBM -> (array of Objects) What I am looking for is to get all the values f...
(1) odpowiedzi
2016-12-30 08:12 C# Clear Biometric logs after logging into postgresql database without any loss of data »
I have developed a windows service which will log all the bio-metric logs. For this to run, i have used npgsql for postgres connectivity. The below co...
(0) odpowiedzi
2016-12-29 08:12 In postgresql how to change the value in jsonb type cloumn? »
Now I want to use postgresql function to change the jsonb type cloumn's value,now I have a function achieve the type json CREATE OR REPLACE FUNCTION...
(1) odpowiedzi
2016-12-28 16:12 SQL Server's SET NOCOUNT ON Postgresql equivalent »
I've to help migrating a SQL Server 2008 database to a PostgreSQL 9.4.10 one. The original querys have SET NOCOUNT ON and SET NOCOUNT OFF several time...
(0) odpowiedzi
2016-12-27 17:12 query that shows if the tables might need analyze and vacuum »
i have this doubt I loking for a query that returns if my tables from given schema need analyze and vacuum before wraparound wich can not happen, so ...
(0) odpowiedzi
2016-12-22 16:12 Generate serie with prefix and leading zeros (postgresql) »
I am trying to generate a serie that contains both prefix ('A') and leading zeros. SELECT * FROM generate_series(8,12) will generate a serie 8 9 1...
(2) odpowiedzi
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