Data dodania Pytanie
2017-05-11 16:05 Reseting a sequence (case sensitive) »
I try to set a sequence (test_Id_seq) to a new value like that (notice the upper case letter 'I' in the sequence name): SELECT setval(public."test_Id...
(1) odpowiedzi
2017-05-09 08:05 SELECT a column from another table based on another table's value »
Ok so the title is bit of a mess, but I have a table city like this: id | name | population 1 | Bla bla | 1323 2 | Blaer | 35365 Now I'm ...
(3) odpowiedzi
2017-05-09 01:05 How to query for records with associations that either don't exist or all have non-null value? »
I have a tasks table in Postgres is 9.4.7 like this: goal_id | expires_at 1 | null 1 | 2017-05-3 2 | null 3 | 2017-05-3 ...
(1) odpowiedzi
2017-05-08 15:05 Postgres Copy data from two file in two table »
I am trying to execute the \copy command to insert data to two tables from two files (The relations about then are master, details), to insert into th...
(0) odpowiedzi
2017-05-08 07:05 postgreSql log file Errors »
My application is deployed on remote application server (Linux) and from there it tries to connect to DB server (PostgreSql 9.4) which is again presen...
(0) odpowiedzi
2017-05-07 02:05 Trouble getting count of points inside polygon with PostGIS »
I am trying to find points from one table that fall within polygons from another table. Both tables have a geom column, both are using SRID 4326 which...
(0) odpowiedzi
2017-05-06 21:05 why does my plpgsql function return no rows »
when the two queries are run independantly against a user I get the results 300 and 0 however in my function I am getting no rows returned. I am movi...
(1) odpowiedzi
2017-05-05 18:05 Create dynamic sql with $BODY$ as part of the query »
Im creating my script to partition my table. When I try to create the trigger realize can't use $BODY$ in the dynamic trigger sql. Looks like is confu...
(0) odpowiedzi
2017-05-04 21:05 Building query in Postgres 9.4.2 for JSONB datatype using builtin function »
I have a table schema as follows: DummyTable ------------- someData JSONB All my values will be a JSON object. For example, when you do a select *...
(1) odpowiedzi
2017-05-04 12:05 distributed postgres depolyment out of sync »
I setup a distributed postgres database system and configured replication using hot_standby wal_level. There is one central master database in place ...
(1) odpowiedzi
2017-05-04 08:05 SQL: Delete parent when child (but is theoretical parent) is deleted in a OneToOne relationship »
Hello dear Stack Overflow community, I searched many hours already but I couldn't find a solution my quite unique scenario. Maybe you guys can help. ...
(1) odpowiedzi
2017-05-02 01:05 postgres: how to count text values (e.g. "yes") in a column »
I would like to count how many yes exist in each row at column B. Any efficient way of dealing this? I am actually aggregating data so I am not co...
(0) odpowiedzi
2017-04-27 18:04 PostgreSQL replication between different major versions »
AFAIK the documentation states: In general, log shipping between servers running different major PostgreSQL release levels is not possible. It is ...
(1) odpowiedzi
2017-04-27 14:04 how can get psql error log sepereatly in unix shell script »
actually my issue isA when i am using seperate log file for both error and success. but error log file having success logs also. how can i figure it ...
(0) odpowiedzi
2017-04-27 13:04 Postgres wrong query result with timezones »
My Table looks like this: Inventory inventory | creationDate {} | 2017-04-27 14:15:15.25+02 {} | 2017-04-27 13:03:02.205+02 {} ...
(2) odpowiedzi
2017-04-25 08:04 postgrsql silent installation issue with powershell »
I am doing unattended installation of postgresql-9.4.4-3-windows-x64, using this command with Invoke-Command: postgresql-9.4.4-3-windows-x64.exe --un...
(1) odpowiedzi
2017-04-24 23:04 json_array_elements with null values »
I'm using PostgreSQL 9.4.5, 64 bit on windows. I've got some irregular sized arrays. I want to use json_array_elements to expand the arrays similar t...
(3) odpowiedzi
2017-04-24 16:04 Gradual database migration »
We have a quite large (at least to us) database that has over 20.000 tables, which is running in an AWS EC2 Instance, but due to several reasons, we'd...
(1) odpowiedzi
2017-04-24 13:04 How to get data in 1 row using below code »
i want to get data in 1 row here by keeping the corresponding patient_id iam getting data in 1 row but if i execute by giving input parameter of funct...
(1) odpowiedzi
2017-04-23 13:04 plotting geometry directely from postgis using geopandas and python on ubuntu »
i'm trying to plot a geometry from postgis using geopandas and python, but i'm not getting anything (no error, no result). here's the code i'm using, ...
(0) odpowiedzi
2017-04-21 14:04 Detect specific string including wildcards and isolate wildcards in PLPGSQL »
Is it possible in PostgreSQL 9.4 (PLPGSQL) to detect if a string contains a certain string including wildcards and get the wildcards, ex.: IF NEW.my_...
(1) odpowiedzi
2017-04-20 22:04 GROUPing extracting first and last row »
I have the following "starting" query: select fecha as date,velocidad as speed, velocidad>100 as overspeed from reports.avl_historico_35489804663...
(3) odpowiedzi
2017-04-20 17:04 array_agg with distinct works in postgres 9.4 but not in postgres 9.6 »
I have a query that use array_agg with distinct as an argument and is not accepted on postgres 9.6. I created this sample to illustrate the issue: c...
(2) odpowiedzi
2017-04-20 14:04 Search in jsonb and array combination in postgres with rails4 stored_accessor »
I have a model called Event, where I have stored_accessor "list" (stored like data: {"list"=>[{"key"=>"key1", "value"=>"value1"}]}). I need...
(1) odpowiedzi
2017-04-19 16:04 Select only the rows with the latest date in postgres »
I have data in a table set up as follows with date stored as date type. I only wanted the latest date for each row (house) the number of entries per h...
(3) odpowiedzi
2017-04-19 09:04 How to fetch data based on multiple key pair in Postgresql + Rails4 »
I have a table XYZ which has few columns in which, I need to filter out resultset based on Two columns (col1, col2) requested params Request params l...
(1) odpowiedzi
2017-04-18 14:04 How to import BLOB formatted as CSV to postgres »
I have a csv file that is an output from a BLOB store. The csv contains 6 related tables. Not all records utilise the 6 tables but all records do use ...
(1) odpowiedzi
2017-04-17 08:04 Insert, update or alter column in postgres when working with to_char »
What i have; 3 tables in postgres 9.4. Table 1 is the main table tables 2 and 3 contain some additional data (an update multiplier) which is quarterl...
(1) odpowiedzi
2017-04-16 19:04 Postgres quarter function »
When running select to_char ("dateoftransfer", '"Q"quarter YYYY') as quarterly FROM table; I get back Q3uarter 2001 but expect Q3 2001 "dateoftran...
(1) odpowiedzi
2017-04-16 12:04 PostgreSQL Loop jsonb rows in 2 recordsets and find change »
I am a novice in PostgreSQL world, and not aware about its offerings much. I have a requirement where I have to find changes in values in 2 recordsets...
(0) odpowiedzi
2017-04-12 13:04 How to read multiple refcursor return by other procedure to another procedure »
i'm having one procedure which returns setof cursors Now i have to call that procedure to another procedure and access the data that return by that p...
(1) odpowiedzi
2017-04-11 16:04 Query Optimization for the below one: »
I am running this query which fetches close to 100 records. But it is taking nearly 10 mins to accomplish this. Can someone help me in optimizing it i...
(0) odpowiedzi
2017-04-10 20:04 Row-based security in Postgresql 9.4 based on views for read and write access »
For a system, where the users have full shell access, we want to manage the folders shared between the users via access control lists, using an postgr...
(0) odpowiedzi
2017-04-10 10:04 Insert Data in specified column if column value id matches the description of the ID in another table (normalized form) »
In order to do this (in Title Description) it's obvious that it's already a normalized database so an inner join kind of check will be used for sure. ...
(2) odpowiedzi
2017-04-10 00:04 Postgresql crosstab query with multiple "row name" columns »
I have a table that is a "tall skinny" fact table: CREATE TABLE facts( eff_date timestamp NOT NULL, update_date timestamp NOT NULL, symbo...
(1) odpowiedzi