Questions tagged as 'postgresql'

1
answer

Search with accents and no accents Postgresql

Hello, I'm trying to do a search through a field in the application, it looks for the word in the database (postgres), however, there is a lot of product registered in the database, with and without an accent, for example, coffee and coffee a...
asked by 19.07.2018 / 16:20
1
answer

When the container does not know the host name?

I created a container in docker and it tries to access a host called pgmaster. On the machine where docker is installed I added the following host: 10.0.0.3 pgmaster to /etc/hosts . So much when I try to make an ssh works perfectly:...
asked by 03.05.2018 / 17:30
2
answers

Conversion from varchar to float when the string is empty and / or blank

I have a column where the strings are in the following format: " 12.05% " I need to do some calculations with these values, and I'm formatting the values that are acceptable for float / double format etc. I have the following line in my qu...
asked by 09.05.2018 / 18:28
1
answer

Is there a way to change the field type of a query in delphi without having to delete and include it?

I have the following situation, I use PostgreSQL and Zeos in DelphiXE, I needed to update the component to better support LATIN1 x UTF-8, now I can work with all kinds of characters, blz. But another problem came up, some fields that were Mem...
asked by 26.04.2018 / 17:24
1
answer

Problems with encoding in Database Query

When trying to execute a SELECT , using fields that save data in the JSON structure, I see a problem with the data that may come: SELECT tbl_pf.nome, tbl_pf.adicionais::JSONB->'recebeTaxa' AS localTaxa FROM tbl_pf;...
asked by 26.04.2018 / 19:55
1
answer

Browse the best-selling product

I'm having difficulty joining two tables and using some aggregate function, I've tried it like this: SELECT nome FROM produto INNER JOIN vendaproduto SUM(quantidade) ON produto.idproduto = vendaproduto.idproduto But it is giving error ......
asked by 12.06.2018 / 02:42
2
answers

Select in Python (with BD: Postgres)

I'm not able to do a select in the PostgreSQL database. Python 3. conn = psycopg2.connect(host="localhost", dbname='postgres', user='postgres', password=postgres) cur = conn.cursor() cur.execute("select id_log, nm_ip, dh_chamada, nm_tipo, nm...
asked by 11.06.2018 / 15:51
2
answers

Problems with array type?

I'm having trouble formulating a chart. I have basically 2 fields: categorias and dados . Within categorias , the information should be arranged as follows: ['categoria 1', 'categoria 2', 'etc'] surrounded by quotati...
asked by 12.06.2018 / 13:22
1
answer

Create a column for each row returned from Select

Yesterday I posted a question about how to return something even if there are no records found, and with the help of @RovannLinhalis we get the following query : with dados as ( SELECT public.controleimpressoes.codigo, public.impresso...
asked by 09.03.2018 / 12:43
1
answer

Error trying to insert data to PostgreSQL [closed]

I'm having trouble entering information into DB. I believe the error is in the DAO layer more specifically in the insert function. Could you help me find this error? CONNECTIONFACTORY package DAO; import java.sql.Statement; import java.sq...
asked by 15.02.2018 / 13:39