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
votes1
answer37
viewsUpdate table via Precedent/Rigger
I have the following table structure: CREATE TABLE FORNECEDOR( ID INT PRIMARY KEY, CNPJ varchar(255), ID_FOUR INT ); CREATE TABLE PRE_FORNECEDOR( ID INT PRIMARY KEY, CNPJ varchar(255), ID_FOUR INT…
postgresqlasked 3 years, 7 months ago Adriano Gomes 711 -
0
votes1
answer52
viewsTrigger Insert in the same table
Hello, I have a table where I keep records of movements, it is inserted a record where it is possible to inform a payment installment, for example, a purchase made in 12 times whose current…
-
0
votes0
answers17
viewsPostgresql - Automatic date return from another data field
good afternoon! I’m trying to create a Rigger that returns the automatic date from another date field. Type insert in one field this date and in the other return 730 days ahead. In this case, I have…
-
0
votes0
answers33
viewsSequelize error while trying to connect to database "Dialect needs to be explicitly supplied as of v4.0.0"
I am trying to establish a connection to my postgres database using the sequelize, when I try to connect it accuses the following error, even with the dialect parameter being defined, yet it says it…
javascript database postgresql sequelize-jsasked 3 years, 6 months ago Marco Aurélio Lopes Júnior 145 -
0
votes0
answers32
viewsSQL doubt string_agg (Delphi+Postgres)
Good evening. This sql was running exactly as I wanted, but yesterday started to get out of the field order g gallery.. It had an output (example) like this: GALLERY 10: 26 / GALLERY 11: 23 /…
-
0
votes0
answers42
viewsHow to unify the results of Count POSTGRES
Good morning, I need this query to return the unified result, different from what it returns to me, does anyone have any idea how to do this in Postgres?? went until May(May) but continues until the…
-
0
votes0
answers36
viewsHow can I add values from a table using a date as a parameter?
I am trying to add some values of a table taking a date into consideration in sql. I want to add up the values until it reaches a date and a value greater than or equal to the initial value. An…
-
0
votes1
answer37
viewsAuto increment in postgres/sequelize
I have a Postgres database using Sequelize (Node/express) as ORM. I have a table called Students, there are columns: id and name. In this table Students, I have several registered students, however,…
-
0
votes1
answer88
viewsHow many days a week (Monday, Tuesday...) do you have in a 1-month period?
I need help to return in an SQL the amount you have of each day of the week in a period of 1 month, for example in the month 06/2021 has 4 Mondays,5 Tuesdays,5 Wednesdays...etc. I need to know the…
-
0
votes0
answers26
viewsNpgsql.Postgresexception: 53300: remaining Connection slots are reserved for non-replication superuser Connections
I am using Dotnet Core and C# to fetch data from an API and saving to a Postgresql database. And arrives at a certain part of the process in which this error appears: Exception has occurred:…
-
0
votes1
answer34
viewsUNION is not consolidating SOMA between 2 Postgresql tables
I’m new here and I’m looking for a solution to this problem. I have two tables that add production values per hour of two different teams, however, with the UNION occurs the duplication of lines…
-
0
votes0
answers14
viewsTDD with Jest and sequelize - POSTGRES Migration error for SQLITE
I am implementing TDD with Jest in a Node with express application, my database is POSTGRES and I have several sequelize Migrations already configured, and for my test scenarios I am running these…
-
0
votes1
answer42
viewsHow can I reconnect to the database by putting variables on standalone instead of in Java code
I need to include the variables urlLot, user and pass in the standalone so you don’t have to change the code and recompile every time I switch environments. Unfortunately I can’t think of any way to…
-
0
votes0
answers14
viewsSequelize Error: Sequelizedatabaseerror
Hello, I am building my application on Node and using postgres database. I come across the following error: SequelizeDatabaseError: column \"zipcode\" of relation \"users\" does not exist" My model…
-
0
votes0
answers11
viewsHow to create a materialized view by creating a unique id
I need to create a materialized view, and I need to create a unique id within that view: I have a square table with the geometry of the court (which have unique id). I’m crossing the geometry of…
postgresqlasked 3 years, 2 months ago Clara Magalhaes 25 -
0
votes0
answers5
viewsHow to format knex date with postgresql
I am using knex together with postgres and created a Migrations table.date('birth').notNull(), in the postgres table when I do a query the date is saved in the format 1996-08-06, but when I call the…
-
-1
votes2
answers651
viewsLicensing of Mysql
I’m starting to develop a system that will run on Android, Web and Windows. The 3 versions should talk to each other and the three versions will have the same functions will be a port of the same…
-
-1
votes2
answers167
viewsIs there incompatibility and errors between Internet explorer and Postgresql?
In my work we use Postgresql version 9.0 as a database for several systems. Some customers inform us that sometimes they cannot find certain search data using Internet Explorer 9, 10 and 11. I as a…
-
-1
votes1
answer1864
viewsAccess with another user in postgres
How do I access my terminal postgres with another user I have created without being the postgres?
postgresqlasked 9 years, 3 months ago Ivan 521 -
-1
votes2
answers107
viewsUpdate serial ID when a table is NULL
I’m making a java desktop program, with a product ID automatically incremented by SERIAL. However, when I delete some element or all, the value of the sequence stays on the last one that was added…
-
-1
votes1
answer439
viewsJava - How do I leave the Postgresql Permanent Connection IP?
Good morning, Every time my machine connects to the internet, her IP address changes. My question is... How do I always get access to Postgresql even if the IP of my machine changes? public class…
-
-1
votes2
answers405
viewsHow to integrate a Web Application with a Postgis database? What is the best way?
I’m developing a web application using the Azure platform. I chose to use the Postgresql database with Postgis extension, because the application is summarized in a Webgis and Postgis is the one…
-
-1
votes1
answer2120
viewsList the 10 Best Selling Products
I need to list the 10 best selling products from a table using Hibernate. The table item_sale has the following columns: amount id_product valor_unitario value_sub_Total…
-
-1
votes1
answer1318
viewsConnection is not Associated with a Managed
One of our systems is showing the error below: Connection is not associated with a managed connection.org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6@437f90c8 This mistake has happened a lot,…
-
-1
votes1
answer84
viewsTrigger cursor in book allocation
Well, I have a table called LOCACAO_LIVRO in it I have BOOK and CLIENT information when an allocation update occurs then the id_client will be informed, id_book, the data_de_output and from this…
-
-1
votes3
answers516
viewsError in POSTGRESQL Database Creation
I am having the following error when creating a POSTGRESQL database: SQL CODE: CREATE DATABASE pesadaum; CREATE TABLE user( user_id int PRIMARY KEY NOT NULL AUTO_INCREMENT, email varchar(255) NOT…
-
-1
votes1
answer1291
viewsCompare data from a table in Postgresql
Good morning. I have two tables in the same database, with the same name, but in different schemes. I want to compare the records that are in them, to see if there are identical data. Is there any…
-
-1
votes2
answers1797
viewsHow to take data from 3 tables with INNER JOIN performatively
I got three tables on the bench, Exercise and Exercise. I need to do the SELECT with the INNER JOIN and differentiate columns with the same name: SELECT t.id AS tid, et.id AS etid, e.id as eid,…
-
-1
votes1
answer353
viewsSql in Postgresql: Do Not Repeat Values from a Table field
I have a select that displays the names, date and amounts paid by customers. I must display a list without repeating the names. SELECT c.name, p.created_at, p.amount_paid FROM payments as p, clients…
-
-1
votes1
answer549
viewsRequest ajax does not return what I want
I have a registration page with a form, the person type the year and click on the button to find the registration. With the typed year I have to make the request for PHP to execute the query, return…
-
-1
votes1
answer664
viewsorg postgresql util Psqlexception ERROR syntax error at or near auto_increment in a JSF project
I wonder what that problem might be? 2018-04-30 14:50:08,218 [http-nio-8080-exec-8] WARN org.hibernate.ejb.HibernatePersistence - HHH015016: Encountered a deprecated…
-
-1
votes1
answer556
viewsHow to save a record in Postgresql?
This error occurs when I try to save a record in the Postgresql database, I am using java mai 15, 2018 11:09:18 AM bibliotecapesca.CadastroLeitor BtnSalvarActionPerformed GRAVE: null…
-
-1
votes1
answer739
viewsCreate Function to update column
I need to update a column according to the contents of the other two columns, for example, I have two tables, the table suprimentos and the table estoque, Table supplies codigoSuprimento…
-
-1
votes1
answer34
viewsSearch inside another Rails scaffold
I have a problem, an example created two scaffold book and loan, then created a controller and an index called report : rails generate controller RelatoriosEmprestimos index I want to do specific…
-
-1
votes2
answers96
viewsPostgresql database restrictions on commercial application
What are the restrictions on using Postgresql database in my commercial C application#? What’s the size limit? And simultaneous connections? What problems can I face, in the matter of networking…
-
-1
votes2
answers475
viewsAuto increment (Postgresql)
When I give delete from on the table, then I give select, back to table without insert no, at the time I give the insert again in the table the data id does not restart from the 0. In other words,…
postgresqlasked 6 years, 4 months ago Natalie 9 -
-1
votes3
answers737
viewsMake an "Update" with sum of a number that is as character
I need to perform a update summed in a table whose column is of the type text. Example: UPDATE produto SET codigo = 'codigo'+ 1; I have the following return: UPDATE produto SET codigo = 'codigo'+ 1;…
-
-1
votes1
answer46
viewsPostgresql Query
I have a sales table (id, date, store, customer, value), which SQL command to return me the 3 biggest customers (highest value) of each store. Does anyone know?
postgresqlasked 6 years, 3 months ago krol 9 -
-1
votes1
answer881
viewsSet auto-increment in Dbeaver
After creating the column idpagamentoCielo as a primary key, I could not add property auto-increment to the column. How can I assign the property auto-increment to the column idpagamentoCielo? Note:…
-
-1
votes1
answer393
viewsHow to limit the result of a query to 2 decimal places?
I have the following appointment: SELECT SUM(ValorBruto) FROM faturas WHERE DataCaptura between'2018-10-01' and '2018-10-30' The result is displayed to 4 decimal places. It would cost to view only…
postgresqlasked 6 years ago Programmer 1 -
-1
votes1
answer54
viewsHow to transform sql scripts into xml liquibase?
Hello, I have all the base scripts in postgresql and wanted to transform into xml liquibase to use on my server. It is possible or I will have to manually convert the scripts?
-
-1
votes1
answer3233
viewsTake only the value and format in 2 decimal places
Well, I have a python script that queries two different databases to verify values per day, one in SQLSERVER and the other in Postgres. I used an if to warn if the values were different and if it…
-
-1
votes1
answer77
viewsWhich SQL Script in Postgres to return the fields belonging to PK?
Which SQL Script in Postgres to return the fields belonging to the primary key of a specific database table ?
-
-1
votes1
answer36
viewsHelp with Update SQL
I need to learn how to update my chart. I have the "Person" table, this one has the "Description" column. At the time it was created a maxlenght of 100 characters was added, I need to change this so…
-
-1
votes1
answer130
viewsSLA calculation in Postgresql
I want to calculate the time between the registration date so far (current_timestamp). Ex: If the record was 2019-03-01 09:11:17 and now it’s 2019-03-01 09:46:17 then it should return me 00:35:00…
-
-1
votes1
answer209
viewsHow to manipulate Database directly in Eclipse IDE?
It is possible, perhaps with some plugin, to manipulate (manage) Postgreesql databases with Eclipse IDE? I checked the Dbviwer, but has no option to create table directly from inside the Eclipse.…
-
-1
votes1
answer24
viewsDo you know of any unique Postgresql features?
I wanted to know if there is any function or feature exclusive to Postgresql, something that does not have in the other DBMS’s.
-
-1
votes1
answer57
viewsConditional to execute sql statement
In SQL Server I can use a 'if' to check if a table has a column and depending on the return of that logical function, execute or not an instruction, as an example below: IF…
postgresqlasked 5 years, 5 months ago Adriano Gomes 711 -
-1
votes1
answer380
viewsHow do I enable Postgresql in Cpanel?
Good afternoon. I would like to know how to activate Postgres in the Cpanel menu of the database part, I need to create a database in Pg. I have already done the installation in WHM and enabled the…
-
-1
votes1
answer223
viewsLIMIT TO TWO OUTPUT CHARACTERS WITH REGEX - POSTGRESQL
I have the query below that returns me only the numerical values of my string field, I wanted to limit it to two output characters. QUERY SELECT NULLIF(regexp_replace(temperature, '\D','','g'),…