Questions tagged as 'postgresql'

0
answers

java + postegre connection problem in heroku

Trying to connect java to the heroku database (postgre), I have checked the url several times and have no errors. I am not using hibernate. By pgadmin I can insert into the bank normally. How to fix this error? Should I make any changes to pom.x...
asked by 16.06.2016 / 17:32
1
answer

Why not insert in the database?

Why does not the following insertion code in the database work? The code arrives until Joption "has arrived!" private void btnCadastroActionPerformed(java.awt.event.ActionEvent evt) { String sql...
asked by 04.06.2016 / 03:36
0
answers

Grouping SUMS by Date in PostgreSQL

I'm trying to get a total of the grouped requests by date as follows SELECT sum(pit.preco) AS preco, sum(pit.quantidade) AS quantidade FROM cliente c LEFT JOIN erp_pedido ped ON ped.id_cliente = c.id_cliente LEFT JOIN erp_pedido...
asked by 20.05.2016 / 18:45
0
answers

PHP Connection Pool: PDO with PostgreSQL, what to use?

Thinking of the following scheme: Linux Server (Can be Ubuntu Server) + PHP using PDO + PostgreSQL + Apache HTTP Server + Some connection pool I would like some pool hint (which is trustworthy) to manage the connections to the database. I...
asked by 13.05.2016 / 03:37
0
answers

select query in a database

Good is the following I'm messing here with some data, I have a table with census data. Tables First table where you have the data. Fields residencia_nut3, trabajo_nut3 values 112, 180 values 149,146 table nut3 id fields, description...
asked by 06.06.2016 / 11:23
1
answer

Deploying non-JDBC-compliant driver class org.postgresql.Driver

Good night everyone. I have a problem, which I believe is simple to solve. In the IDE (netbeans) the project runs smoothly, but when I publish in jbossacontece the following error:    18: 54: 40,111 INFO (org.jboss.as.connector.deployer...
asked by 12.05.2016 / 00:05
1
answer

Query with field of type json in Doctrine 2 and Symfony 3

Does anyone know a way to perform a query using Doctrine which has a JSON field? Postgresql query example: select id, nome, tipo, '{"idUsuario":465,"login":"paulo"}'::json from public.usuarios limit 5; I need to make this query in Doctri...
asked by 08.04.2016 / 21:43
1
answer

Fetchall () limited in python

I am making a code that does a query in postgres and returns it in a list, however this is giving memory error. The part of the code that does this: c = conn.cursor() c.execute("SELECT latitude, longitude, gid FROM pontos") records = c.fetch...
asked by 03.04.2016 / 17:02
1
answer

Error: make a query in dao that is an alias

This query normally works in postgreSQL: select nome as "pessoas?" from pessoa But in java I made a dao that has a method called findAlias: sql = "select nome as 'teste?' from pessoa where id=?"; Give the message:    ERROR: syntax e...
asked by 12.04.2016 / 17:16
2
answers

How to pass an Array to the IN clause of a flat query?

I'm using ActiveRecord to run queries on several different databases. In one of the queries, I have to do the following: publications_to_read = [1,2,3,4] ActiveRecord::Base.connection.execute("ALTER TABLE publications SET readed = TRUE WHERE i...
asked by 13.04.2016 / 02:22