Questions tagged as 'postgresql'

1
answer

Error connecting to Postgres remotely

I'm having problems connecting to the company database, I'm accessing from home. My other colleagues can access it normally. Both pgAdmin and terminal have been experiencing a problem. Strange that I can access other services li...
asked by 15.05.2015 / 20:45
1
answer

query optimization that adds values according to a clause

Hi. I have a query that should bring two columns, one of the columns will return the value of one column, plus the sum of another column respecting the where clause to add the values. I came to find the result that serves me as follows:...
asked by 03.08.2015 / 17:22
1
answer

JqGrid. onSelectRow - Get field id and pass with url

Oops, I have the following code: // jqGrid // $grid->('onSelectRow', "fnHistoricoPessoa"); // fim jqGrid// // função para onSelectRow// function fnHistoricoPessoa(){ var kwGrid = $("#kwGrid").jqGrid('getGridParam', 'selrow'); if(k...
asked by 18.03.2015 / 19:14
1
answer

PostgreSQL constraint error

I have a code that is giving the following error:    there is no unique constraint matching given keys for referenced table   "schedule" Code: CREATE TYPE weekday AS ENUM ('Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sab...
asked by 13.02.2015 / 20:49
3
answers

PostgreSQL Query - How to do this?

How do I do a SQL query on this table: ID Col2 Col1 -- ---- ---- 11 1 A 12 2 D 13 3 G 14 1 B 15 2 E 16 3 H 17 1 C 18 2 F 19 3 I To return this result: 1 A B C 2 D E F 3 G H...
asked by 24.02.2015 / 22:21
1
answer

Make single-column calculation in PostgreSQL

How can I make a calculation (example: subtraction) of summed values of the same column in PostgreSQL? Query example: DROP TABLE if exists saldo; CREATE TEMPORARY TABLE saldo AS select a.usuario from table as a; SELECT a.usuario, pontosP,...
asked by 26.11.2014 / 15:50
1
answer

Rails 4 select Uniq

I have the Items table: id enrollment_id turma_id 11 2 2 12 2 3 13 2 2 14 2 2 15 2 3 I want my result to be this: id enrollment_id turma_id 11...
asked by 18.11.2014 / 18:21
1
answer

Android connect in Postgres

I have an application, and I want to use the postgres database, this database is on a server, and I can access that server, as I make the connection. I do not know if I explained it right, but I think you can understand it.     
asked by 29.08.2014 / 02:46
1
answer

How to add postgres library in eclipse / android

I am making an app on android, which I will connect directly with a postgres database on a server. But I do not know how to add the jar from postgres, if I add it in the Java Build Path in the project properties of the error and it does not exec...
asked by 14.10.2014 / 01:37
1
answer

PHP + POSTGRESQL (Begin, Commit, Rollback)

In my application I have a certain process to perform test. This involves database with multi tables. I would like to know if it is possible to start a BEGIN; to do all the manual development, and in case of error, to realize a ROLLBAC...
asked by 13.08.2014 / 15:45