Most voted "postgresql" questions
Postgresql is an open-source, object-relational database management system (ORDBMS) available for many platforms, including Linux, UNIX, MS Windows, and macOS. Please mention your version of Postgresql when asking questions.
Learn more…1,437 questions
Sort by count of
-
0
votes0
answers121
viewsCopy a record from a database with several related tables
I’m trying to copy a record from a database table, but the problem is that this table has a lot of links, foreign keys. The record should involve about 40 tables. Is there any way I can do this? I…
-
0
votes1
answer187
viewsAbout Trigger no postgres
Good guys, my problem is this, I want to make a table partitioning in postgres because a table has zillions of records and searching for it takes a lot (this table tends to grow considerably in the…
-
0
votes2
answers614
viewsDuplicate results when searching with POSTGRES
I’m performing a database search where I perform some JOIN on different tables. In the SQL that inseir below I make a Join with the product table_categoria_compatible where the product id must be…
postgresqlasked 8 years, 11 months ago Gabriel Schmidt Cordeiro 728 -
0
votes1
answer2321
viewsFetchall() limited in python
I’m making a code that makes a query in postgres and returns in a list, but this is giving memory error. The part of the code that does this: c = conn.cursor() c.execute("SELECT latitude, longitude,…
-
0
votes1
answer175
viewsQuery with json type field in Doctrine 2 and Symfony 3
Does anyone know a way to perform a query using Doctrine which has a JSON field? Example query in Postgresql: select id, nome, tipo, '{"idUsuario":465,"login":"paulo"}'::json from public.usuarios…
-
0
votes1
answer31
viewsInstance error for class
Good afternoon, I’ve looked at it many times and I don’t understand why it’s wrong. I need to instantiate the "created variable" that is in Jframe for the User class. But it keeps saying that on the…
-
0
votes0
answers227
viewsPHP:PDO connection pool with Postgresql, what to use?
Thinking about the following scheme: Linux Server (may be Ubuntu Server) + PHP using PDO + Postgresql + Apache HTTP server + Some pool of connection I would like some pool tip (that is reliable) to…
-
0
votes2
answers161
viewsPostgresql oid column attribute type with EF6
What type of attribute should I use to represent a type column oid of Postgresql with Entity Framework 6 Code-First? Remembering that the type oid Postgresql is for storing files.…
c# .net entity-framework postgresql entity-framework-6asked 8 years, 6 months ago Matheus Saraiva 2,157 -
0
votes1
answer42
viewsdate manipulation in postgresql
I have a database with several records, since 2001 until 2010. How do I select all tuples with dates after the day 2001-05-02? Data is of the type character varying(254).…
-
0
votes1
answer73
viewsError in android application when searching data in postgresql database via Webservices with Ksoap2
First I made a Webservice Using Axis 2, where it has the class connected with the database, and the class with ordering ADO with CRUD. Using the Soupui, I can carry out the method calls. So far so…
-
0
votes1
answer1903
viewspgsql connection problems in Laravel 5.1
I am trying to connect to the pgsql database by Laravel 5.1 but an error is appearing: Pdoexception in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using…
-
0
votes0
answers27
viewsselect query in a database
good is the following I am to stir here with some data, I have a table with data of the censuses. Tables First table where you have the data . Fields residencia_nut3, work values 112, 180 values…
postgresqlasked 8 years, 5 months ago usersantos 765 -
0
votes1
answer78
viewsAutomatic SCHEMA creation in postgresql
I’m having a problem with the following, I need to create a Rigger that when a given row is inserted it creates a SCHEMA with a specific structure! For example, in the public scheme, I have the…
-
0
votes1
answer227
viewsGroup SQL values by two fields
I’m trying to group a table so I can make a Count, but I’m having difficulties. The structure of the table is as follows: ID - NOME - IDADE - ESCOLARIDADE 1 - João - 15 - Ensino Fundamental Completo…
-
0
votes1
answer401
viewsGrouping data by age
good I have a database that contains professions , people , and sex wanted to group by age group and by profession and sex and make a calculation of the same. problem repeats me several tracks for…
postgresqlasked 8 years, 9 months ago usersantos 765 -
0
votes0
answers683
viewsHow to record and display images using Postgresql and Laravel 5.1
I have the following code in my Controller to save the image in the database, not any error so I think it works right. $data = Input::file('assinatura'); $escaped = bin2hex($data);…
-
0
votes1
answer733
viewsReturning an array of a function in Postgresql
I’m having a question here that I need to solve with a postgresql database function. The problem is this, I need to cross a table that’s called stocking with a view called stockpile. In this table…
-
0
votes0
answers418
viewsProblems connecting php to postgresql remotely
I’m trying to remotely connect postgresql to PHP on an Apache server. On my local machine I can run the connection without any problem. The point is that it is not working remotely. I’m running the…
-
0
votes2
answers68
viewsGroup two tables
I have two tables. A call Pessoa and another call Evento. Pessoa owns the fields id, name and email. Evento owns the fields id and pessoa_id. The table Evento contains several events for each…
postgresqlasked 8 years, 3 months ago Jonathan 1,073 -
0
votes0
answers380
viewsIdentify user by login
Hey there, guys. I am developing a system that deals with user registration and I have the following problem: in the system there will be 3 types of users: Administrator, Normal and Temporary.…
-
0
votes0
answers283
viewsHow to get file from inside the database?
I’m using postgresql as sgdb, and I’m saving files. txt in bd, so far, all right, it’s working right, but I’m not finding a way to get the content of the txt files saved in bd, I’m using php with…
-
0
votes2
answers2498
viewsProhibit duplicate registration
Hello, guys. I’m with a program that works with user registration. In this program I would like to implement a function that prohibits the registration of Cpf or email that already exists in the…
-
0
votes1
answer1041
viewsOnclick problem, I cannot pass Array information to a text view
I’m having trouble inflating a list with information from the bank, I want to take the user information and set it in a list, but only with a type of data as a name, however it presents the…
-
0
votes2
answers1141
viewsPostgresql - Query data from a range and bring a boundary of lines but spaced
Good morning Guys, all right? I have a performance problem in a system and need to solve by customizing an SQL. Let us imagine the following scenario: - A table with millions of records, each record…
-
0
votes1
answer129
viewsApplication to make emergency calls
I am trying to make q my application make an emergency call by clicking the button, however while running it presents the following error: ERROR: FATAL EXCEPTION: main Process:…
-
0
votes2
answers47
viewsFind data not registered in postgres
I have field records that have fields with years and months like this: id mes ano ---------- 1 1 2005 ---------- 2 2 2005 ---------- 3 4 2005 ---------- 4 5 2006 ---------- My doubt is: It is…
-
0
votes1
answer79
viewsError: make a query(query) in dao which is an alias
This query normally functions in postgresql: select nome as "pessoas?" from pessoa But in java I did a dao which has a method called find: sql = "select nome as 'teste?' from pessoa where id=?";…
-
0
votes2
answers75
viewsHow to pass an Array to the IN clause of a flat query?
I am using Activerecord to run queries in several different databases. In one of the queries, I have to do the following: publications_to_read = [1,2,3,4]…
-
0
votes1
answer112
viewsHow to Save Data to Generate a PDF?
There is a part of the system where the user will fill a lot of information just choosing between options selects, those selects are fed information I have registered in my database. When I am…
-
0
votes0
answers294
viewsExternal and internal database
I’m a beginner in programming Android and I am with a doubt... it is possible for the same application to have an internal and external database at the same time? For example some information is…
-
0
votes1
answer121
viewsExcess symbol % within LIKE
We have a GX system EV3 U2 generating Java and connecting in Postgresql 9.3 database. Overall the performance is acceptable, but at certain times we have bottlenecks and I realized that happen just…
-
0
votes2
answers680
viewsHibernate jumping id sequence
I managed a project by JHipster who uses Java, Spring and Hibernate in backend, I created a class as follows: Liquibase: <changeSet id="20160504131602" author="jhipster"> <createTable…
-
0
votes1
answer95
viewsDeploying non-JDBC-compliant driver class org.postgresql.Driver
Good night to you all. I have a problem I believe is simple to solve. in IDE(netbeans) the project runs smoothly, but when I publish in jbossit is the following error: 18:54:40,111 INFO…
-
0
votes0
answers259
viewsGrouping SUMS by date in Postgresql
I’m trying to make a pick up the orders totals grouped by date as follows SELECT sum(pit.preco) AS preco, sum(pit.quantidade) AS quantidade FROM cliente c LEFT JOIN erp_pedido ped ON ped.id_cliente…
-
0
votes1
answer64
viewsHow to concatenate a value with a string
Hello, I need to create a postgresql function that gets two ages and the function returns birth dates. I’m having difficulty calculating the date of birth, I’ve tried using interval and other…
postgresqlasked 8 years, 1 month ago user46438 -
0
votes1
answer14
viewsProblem deleting a field from the table
When I try to delete a row from my table, it returns me this error ERROR: update or delete on table "menu" violates foreign key constraint "fk_menu_id" on table "view_menu" DETAIL: Key…
-
0
votes1
answer203
viewsWhy don’t you put it in the database?
Why does the following database entry code not work? The code reaches Joption "arrived!" private void btnCadastroActionPerformed(java.awt.event.ActionEvent evt) { String sql = "INSERT INTO…
-
0
votes0
answers255
viewsJava + postegre connection problem in Heroku
Trying to connect java to the Heroku database (postgre), I have checked the url several times and there are no errors. I am not using Hibernate. By pgadmin I can enter it into the database normally.…
-
0
votes1
answer277
viewsBackup Incremental Postgresql PITR
I have an incremental backup routine running daily saving the logs from Postgresql. Every morning the full backup is performed: pg_start_backup() tar -cvzf /usr/local/pgsql/pgDataPITR/pgdatabk.tar…
-
0
votes3
answers92
viewsCapture which key Unique was raped
I have a function that does insert in a table. This table has two columns that are unique email and login. In other tables there are also unique Keys compostas. Thus, an exception of the type…
postgresqlasked 8 years ago Matheus Saraiva 2,157 -
0
votes1
answer289
viewsPostgresql reserved word problems
Dear friends, I am using locally a code downloaded from Github for educational purposes and I am having trouble deploying War, the error has to do with a reserved word from the database used in the…
-
0
votes0
answers54
viewsquery to get percentage
I’m making a query to get percentage by zone but it’s not working very well for me select nuts3_res_1amc.id as id ,nuts3_res_1amc.localidade as source, nuts3_trab.localidade as target ,nuts3_trab.id…
postgresqlasked 8 years, 4 months ago usersantos 765 -
0
votes0
answers24
viewsA product reference various sizes in the database. How to do?
Hello! I am developing a Java system with Postgresql, and now I have reached a stage where I am with a great difficulty. I have three tables that need to relate, are they: Product: code,…
-
0
votes1
answer919
viewsSELECT with REGEXP
next, I have a table of people: [name, license plate, Cpf] What happens is, some people who have the "same" Cpf have different enrollments. [Same] is in quotes, because in the database, there are…
-
0
votes1
answer155
viewsHow to extract data from a Django Queryset
I have a table with some information, the employee’s name, Pis, date and time, the time field records the time of registration on the time clock, these records are all in the same column, for…
-
0
votes1
answer1471
viewsMerge different columns in the same result
I am trying to generate a SELECT in Postgresql that joins columns of different tables in the same column of the result. Example: Usuario ----------------------- | id | nome | regra |…
-
0
votes1
answer185
viewsBring postgresql data field data saved as string
I would like to know if it is possible to convert this data at the time of select Looking for this data, brings wrong information: select * from vendas where data_venda between '01/03/2016' and…
postgresqlasked 7 years, 12 months ago Carlos Leandro Ferreira de Alm 339 -
0
votes1
answer41
viewsDoubt when changing fields automatically subSelect
I would like to know how I do to change all fields of my sales chart. Modifying the full preco_field that will receive the quantity * preco_unitario. Remembering that I have 150 records in my sales…
-
0
votes2
answers3959
viewsProblems with UTF8 in postgres
I have a JSF project with JPA, Postgres 9 bank The information with lighting is being recorded with accent problems. Ex: ã records as At£ Shark records as Tubara The Bank is with: Ecoding = UTF8…
-
0
votes0
answers90
viewsArray with PHP and Postgresql
Hi, I have a problem with the feedback from the database. It’s returning me a cluttered array and with information from another bank user. Here is the Index: <?php SESSION_START(); ?>…