Questions tagged as 'postgresql'

2
answers

Import PostgreSQL .sql into Neo4j

I have a PostgreSQL backup .sql file and I want to import this file into Neo4j (database in graph). How do I?     
asked by 14.03.2016 / 14:34
1
answer

PostgreSQL - Partial Foreign Key of Composite Primary Key

Talk to people, I need to create a structure template in which all my tables have a primary key consisting of id and version, so I can have multiple versions for each id. Problem: CREATE TABLE table1 { id BIGSERIAL,...
asked by 30.08.2018 / 15:04
1
answer

SQL login method

I have the following scheme: JdbcRowSet myrs = new JdbcRowSetImpl(); myrs.setUrl("jdbc:postgresql://localhost:9999/teste"); myrs.setUsername("postgres"); myrs.setPassword(""); myrs.setCommand("select count (*) from pessoas where cpf = '12345'...
asked by 13.08.2014 / 04:56
1
answer

Importing a txt file in PostgreSQL 9.6

Personal I have the following problem: I have a file in txt format with the following information: 1;Helder;Masculino;GO 2;João;Masculino;RJ 3;Maria;Feminino;PR 4;Pedro;Masculino;MA I used this example to test the import to postgres 9.6, bu...
asked by 04.01.2017 / 13:28
3
answers

Return the name of the month as select

I need to return the name of the month with the command select , I know that with the command Select extract('Month',data) It returns me the number of the month in question, there is a way to bring in that month. In case: 0...
asked by 01.03.2018 / 21:58
1
answer

query executes in bank but in project points error

I have a query native: SELECT dist.nome Distrito, enti.nome Entidade, dist.id_distrito, dist.codigo_dne, dist.id_entidade, dist.id_municipio, dist.id_uf, dist.flag_ativo, muni.nome Municipio, unfe.nome UF...
asked by 05.10.2017 / 13:52
1
answer

Hibernate is not creating or updating DB tables

I have classes beans.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javae...
asked by 02.05.2018 / 21:30
2
answers

Select with null field PostgreSQL

I have the following select SELECT u FROM User u WHERE lower(u.fullname) || lower(u.username) || lower(u.email)) LIKE %:pesquisa% It turns out that I want to do the search by any of the 3 existing fields, but the email is no...
asked by 18.03.2015 / 15:27
1
answer

Group tables in a single

We are updating a system developed in Delphi that stored the data in access tables for PostgreSQL. So far so good, however, I came across the following situation: In the old bank we had the following tables to store the movements: notafis...
asked by 24.09.2014 / 21:03
3
answers

PostgreSQL 8 - Replace the first occurrence of a character in a string

I have a field in a table in a PostgreSQL 8 database whose values are strings and have hyphens in some irregular positions. I would like to replace the first occurrence of the hyphen in the string with a space, but I could not find anything a...
asked by 20.04.2018 / 17:47