Questions tagged as 'postgresql'

1
answer

SQL group by returns duplicate POSTGRESQL

My SQL query is returning multiple rows with the same id following: SELECT distinct (c.nome), c.id, c.email,c.telefone1,c.telefone2, SUM(a.valor) AS "valorDaCompra",u.id AS "idLoja",u.nome AS "nomeLoja", SUM(a.qtd_pecas) AS "qtdPeca...
asked by 01.12.2017 / 20:27
1
answer

pg_dump run via windows command prompt

I executed a dump with the following script: C:\Arquivos de Programas\postgresql\bin>pg_dump.exe -h xxx.xxx.xxx.xxx -p 5432 -U postgres -W postgres Senha:... -- PostgreSQL database dump -- -- Dumped from database version 10.1 -- Du...
asked by 28.02.2018 / 16:14
1
answer

Doubt with select case

I have the following query: select f.no_equipe, i.no_cbo, count(b.tp_atend) from tb_equipe F, tb_cds_prof G, tb_cbo I, tb_cds_ficha_atend_individual D, tb_cds_atend_individual B where F.nu_ine = G.nu_ine and G.nu_cbo_2002 = I.co_cbo_2002...
asked by 18.12.2017 / 14:19
1
answer

Posgresql has no role with superuser how to create one

When I went to check in postgresql it does not have any superuser like I do to change or create a superuser     
asked by 12.01.2018 / 15:30
2
answers

Hibernate Spatial + Postgis + Geotools - persistence failure

I have a problem to persist a geometric data in the database (Postgres) I read in the forums and documentation and did not find anything about it, can someone give me some help? Libs: pom.xml with versions <hibernate.envers.version>...
asked by 28.11.2017 / 17:07
2
answers

Where in an Array JSON Postgres

How can I do to select only the records that have the value "18" in this JSON ? '{"filtros":[ { "tipo":"caracteristicas", "operador":"=", "valor":{"18":[12]} } ]}' I tried to use the comparison with @&g...
asked by 04.12.2017 / 13:53
1
answer

Restore PostgreSQL database in C #

I created a .bat to perform the restoration of a database in PostgreSQL and it worked perfectly using the following command: set PGPASSWORD=postgres123 C:\Progra~1\PostgreSQL.4\bin\pg_restore.exe -i -h localhost -p 5432 -U postgres -c -d dbre...
asked by 27.10.2017 / 20:10
1
answer

psqlodbca.so: Unable to open file of shared objects: File or directory not found

I can not migrate the PostegreSql database to mysql because of this error:    psqlodbca.so: Unable to open shared object file:   File or directory not found I'm using ubuntu 64 Postgresql 9x and workbench 6.x, how should I proceed?...
asked by 23.10.2017 / 14:44
1
answer

PostgreSQL / VisualStudio database modeling

Hello. I have this form: Asforthemodelingofthebankthereinthe"products" part, I intend to load all products (name, quantity available, unit value) and when the person select some and put the quantity will calculate the total. My question...
asked by 10.10.2017 / 17:49
1
answer

Working Flyway with PostgreSQL database

Take a look at the repository. AlgaWorks Institution Repository This project is not mine, but my project is just like this with one difference, I'm using PostgreSQL database and the SQL commands are the ones that exist below; ========...
asked by 17.11.2017 / 09:56