Questions tagged as 'postgresql'

2
answers

How to set SET CLIENT_ENCODING = UTF8 permanently?

I'm using PostgreSQL in my DATABASE Accented information is being recorded with accent problems. Ex: The record as à Shark records as Shark The encoding of my DATABASE and my server are using UTF8 as ENCODING . However, Post...
asked by 09.08.2018 / 16:59
1
answer

How can I make this comparison between the data in the same column?

"Create a function (named fn_bo_varios_states) that receives as a parameter the code (INTEGER) of a victim and return (TRUE or FALSE) if she has already recorded occurrence bulletins in more than one territory state Brazilian. " How can I make...
asked by 09.01.2018 / 00:39
3
answers

Return DB data using List / ArrayList - Java

I'm having a problem, I set up a PivotTable in PostgreSQL and I need to print the lines of it, doing a Java method, the start of which is already established. That would be with a simple% w / o having as a parameter the start and end dates. H...
asked by 08.02.2018 / 19:02
1
answer

How to do pg_dump remotely

I have a Amazon server with small storage space, I need to back up my personal machine. If I enter the server and run pg_dump -h localhost bd > backup.sql everything works, however the backup is 700mb.     
asked by 19.10.2017 / 15:48
3
answers

Bring the most recent record with conditionals - PostgreSQL

I have a table with product information (product code, customer code, date of purchase, purchase value, etc.) and I need to pull the following information: 1- All customers that the last purchase was a specific product. That is, I need to ana...
asked by 02.04.2018 / 20:48
1
answer

Doubt with error "Unable to build Hibernate SessionFactory" Java

I have received the fonts and after doing the server settings, database etc, I am having this problem in compiling. Thank you if anyone can point you in the right direction. [2017-09-11 10:12:46,640] Artifact multlevel-web:war: Error during...
asked by 11.09.2017 / 21:38
2
answers

Return records totaling desired value

I have a table in this format, with more N values and N vendors, approximately 100,000 records, and I need to do through a query or a plpgsql function a way to get all the launch numbers num where the sum of valor_conta is 0 (zero)...
asked by 26.06.2017 / 17:52
1
answer

How to do select in postgres from an html field and use the return to fill the other fields?

Basically I do not have any experience with html, php or javascrip and I'm trying to get around what I'm asked here. The problem is this: I have to make a registration page where the user selects a base year and if the record exists in the da...
asked by 03.04.2017 / 14:26
2
answers

Help with join in two different selects

I have two select (somewhat complex) commands. First code: select A.no_cidadao NOME, F.no_equipe UNIDADE from tb_cds_cidadao_resposta E, tb_cds_cad_individual A, tb_cds_prof as G, tb_pessoa_fisica as H, tb_equipe as F where A.co_seq_cds...
asked by 31.10.2017 / 15:44
2
answers

How to perform an arithmetic operation by changing numerous fields in the database efficiently?

There is a table with 200 records and one of the fields is responsible for indicating the order that these data are displayed (0, 1, 2, 3, 4, 5, ...). I need to rearrange this data, pick up the record from position 167 and put it in position 3,...
asked by 25.08.2017 / 02:49