Questions tagged as 'postgresql'

0
answers

Why do PostgreSQL cost estimates go so wrong?

Someone could help me understand why Postgresql missed several cost estimates in an experiment I did. I'm doing an experiment with 22 queries from the TPCH Benchmark [1], to check the performance of indexes in queries. Of 22 queries, only...
asked by 23.08.2017 / 06:24
3
answers

Use VARCHAR (255) for all fields or choose the best size for each field? [duplicate]

Assuming the following fields (for example): Nome , Rua , Cidade , UF . The Nome would be the name of the client. There are people with 2 short names or people with 5 or more names, so it is possible to have a...
asked by 07.05.2018 / 02:11
3
answers

How to initialize postgresql with ubuntu?

I have the following problem, every time I turn on my machine, I go to the terminal and give sudo service postgresql status , it always appears 9.3/main (port 5432): down . On other machines I have installed, it starts along with...
asked by 18.06.2014 / 18:48
1
answer

How to do SQL query that ignores uppercase, lowercase and accents?

I have a database with multiple movies, and would like to create a SQL query that ignores the presence of uppercase, lowercase, accents, and ç. For example when searching for "brave heart" I would like the query to return the record of the movie...
asked by 08.11.2015 / 04:16
2
answers

Disconnecting case sensitive in Postgres

When I do the command select * from tabela where name like '%teste%' the line with the name TesTe returns, but the same does not happen in postgres, I do not want to put lower(name) to work, how can I disable case sensitive i...
asked by 28.05.2017 / 22:54
2
answers

How to escape quotes in PostgreSql?

I have a function in postgresql function f_criaproduto(p_texto text) , I have to pass as f_criaproduto(' meu produto é 'televisao' da melhor qualidade') . How can I escape the quotes in the text?     
asked by 11.02.2014 / 12:36
1
answer

How to make DbUnit recognize the Postgresql POLYGON data type?

I have the following domain of type polygon in the database: CREATE DOMAIN "global".polygon AS pg_catalog.polygon; The following table that uses this domain: CREATE TABLE user.area_geom ( id_area_geom serial NOT NULL, polygon g...
asked by 13.12.2013 / 17:30
1
answer

What is the difference between pg_query and pg_execute?

I'm new to Postgre and I see pg_query and pg_execute in the application I'm working on, but I can not see any difference between the two. I have to do an insert and I'm not sure which one to use. What is the difference between t...
asked by 27.08.2014 / 17:57
1
answer

Database Mirroring

I'm developing an application on Java using database PostgreSQL , locally. Well I would like to know if there is a way to mirror this my local bank to an external server? Is there any API in Java for this? If you can he...
asked by 30.07.2015 / 03:29
1
answer

Why does the SQL language vary from DBMS to DBMS?

I was used to using SQL for web projects, always using MySQL. One day I had to write a C ++ program that used databases. At first I chose SQLite but needed other computers on the network to connect to the database. So I opted for PostgreSQ...
asked by 29.08.2018 / 20:37