Questions tagged as 'postgresql'

1
answer

Connect PostgreSQL to Delphi 7 via ZeosLib

I'm trying to connect to PostgreSQL in Delphi 7, I found in a forum the idea of using ZeosLib to make this connection by watching a video lesson I got to this configuration: Butevenfollowingstepbystephowtoconfigure,wheneverItrytomaketheconne...
asked by 19.10.2016 / 14:36
1
answer

Making a select on all tables in a schema

Is it possible to search for certain values in columns of other tables? Example: I have a number: 23028908 I want to search my bank for all columns that have this value. Is this possible? How can it be done?     
asked by 14.07.2016 / 16:18
2
answers

What is the best way to save files, Bank or File System?

I have a demand to attach PDFs to my application. Files vary in size from 5 to 200 MB or more. Here comes my question: what is the best option to store? Direct in the database (PostgreSQL) In the file system What are the advantages a...
asked by 14.04.2015 / 15:09
1
answer

Return values for all months of the year by drawing per month

I have the following SELECT: SELECT coalesce(sum(vs.total), 0) FROM tabela_exemplo t WHERE extract(year from t.data_entrada) = extract(year from current_date) GROUP BY extract(month from t.data_entrada); What returns the following result:...
asked by 20.10.2015 / 21:13
2
answers

Group Query Results Postgresql

I have the normal table with the query . status |curso |matricula| --------- |------|---------| Completo |Inglês|001 | Cursando |Mat |002 | Reprovado |Esp |003 | Completo |Inglês|004...
asked by 25.11.2014 / 00:04
1
answer

Hibernate - duplicate key value violates unique constraint

I have the following problem: Person: @Entity @Table(name="tb_pessoa", schema="public") @Inheritance(strategy = InheritanceType.JOINED) public class Pessoa implements Serializable { private static final long serialVersionUID = 1L; @I...
asked by 16.06.2015 / 23:42
2
answers

Rails 4: Changing the "development" database from PostgreSQL to SQLite3 causes the rails server to give error

Hello. For some reasons, I had to change my DB "development" from PostgreSQL rails back to SQLite3. The page has stopped working and the error that appears in the rails server output is this: Started GET "/" for 127.0.0.1 at 2014-04-08 15:1...
asked by 08.04.2014 / 20:30
2
answers

In PostgreSQL, is there a difference between running a dump or doing an export?

This question really left me in doubt, because in postgres there are three types of backup / restore which are: SQL Dump (Generates a text file with SQL command) File System Level Backup Continuous Archiving I wonder if these forms ar...
asked by 26.07.2014 / 18:31
1
answer

Manipulation String postgresql?

I would like to manipulate a String with regexp_replace as follows: String to manipulate: 'TESTE <<TESTE1>> TESTE <<TESTE2>>' String after function: 'TESTE TESTE' I tried it this way: select r...
asked by 02.05.2018 / 16:33
1
answer

How to call a PostgreSQL 9.1 function?

I have a function: CREATE OR REPLACE FUNCTION f_2(p_vetoratributos text[], p_vetorvalores numeric[]) I'm trying to call: SELECT f_2('{"0","0","0"}', '{0,1,2,3,4,5,6,7,8,9,10,11,12,13}') But he is giving error: ERRO: operador não ex...
asked by 31.01.2014 / 15:06