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
answer60
viewsDate no postgresql.PL/SQL
with the function below I want to make this function compare the current date with the date stored in the bank.HOWEVER ,THERE IS NO RETURN . create table mercado( id integer, diaEntrega date, valor…
-
0
votes1
answer141
viewsPostgresql connection to Codeigniter error?
Postgresql connection to Codeigniter error:…
-
0
votes2
answers2222
viewsPostgresql currency conversion
I need to convert a value $1,500,35 (american standard), for R$1.500,35 (Brazilian standard), but the language used in the bank is American and the functions I know only convert the value to the…
postgresqlasked 7 years, 2 months ago jonathan rodrigues 15 -
0
votes2
answers736
viewsError: connection to database already opened
I am creating a method to test a connection with the Postgresql database, but when calling the method that opens the connection an error happens saying that the connection is already open and does…
-
0
votes2
answers236
viewsError in codeigniter querry Builder
I have a problem in the SQL of my query, follows: $sql = "SELECT cl.codigo, pa.codigo AS codigo_participante, pa.nome AS nome_participante, cl.usuario, cr.data AS data_geracao, cl.validade, cl.chave…
-
0
votes0
answers86
viewsDelete duplicated postgresql lines
My code automatically inserts data into a database, making the BD too large and sometimes with repeated information. For this, I want to use the Slowly Changing Dimension (SCD) method so that: - A…
-
0
votes1
answer49
viewsInsert with Postgresql datatime and c#
I would like to ask a question, because the first date does not work? Cmd.Parameters.Addwithvalue("@dtUltAccess", "2017-01-01 01:01:01+09"); Error that returns: Error inserting user - Error: 42804:…
-
0
votes1
answer244
viewsError in convert_from() | SQL_ASCII
When trying to use the function convert_from of postgresql I am facing the following error: invalid byte sequence for encoding "UTF8": 0xe3 0x30 0x30 I’ve looked here in the stack and found nothing…
-
0
votes0
answers52
viewsError in project configuration
What I’m missing, I couldn’t find the mistake. Dispatcher-Servlet.xml <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"…
-
0
votes1
answer191
viewsQuery between two different postgresql cakephp databases
I have two separate databases customers and tickets. Where on the table cliente_tickets of the database customers a configuration is stored from which I need to access certain values in the database…
-
0
votes2
answers139
viewsI can’t find the model generated by Artisan
I used the command php artisan make:model Exemplo and I couldn’t find where he saved this generated model so I could change it. I looked in the app/html folder and found nothing. My db is ready, so…
-
0
votes1
answer29
viewsCan I set up an upload page, which can receive photos, video and zip packages containing photos and/or videos?
I am like an application where the registered user has a page of uploads of images and videos and I wanted to know if there is how, in addition to receiving photos and videos by uploads, if I can…
-
0
votes2
answers153
viewsCount in the Postgresql database
Good morning . I wanted to select in my bank and return the number of registered . Example: tb_client; column: dt_register; in the dt_register column I have this: 2000-01-20 2001-10-05 1990-11-09…
-
0
votes1
answer974
viewsPG_DUMP via shell_exec returns "no password supplied"
I successfully execute the following command from the terminal: pg_dump -d teste -h 127.0.0.1 -p 5432 -U postgres -w -f /home/william/pgsql/17032701.backup However, when I execute the command by…
-
0
votes1
answer65
viewsCalculating Random Password using Arraylist and Resultset in Java
Good morning, I have a question, I need to calculate a new password for each Patient when going through this method: ps = getConexao().prepareStatement(SQL_VERIFICAR_PROTOCOLOS_PENDENTES);…
-
0
votes1
answer598
viewsHow to create entities with composite key in Doctrine?
I have a database that works with composite keys, and I am implementing the use of laravel framework. This is my bank’s structure: I’m using the Doctrine as ORM and discovered that I can not…
-
0
votes1
answer297
viewspsqlodbca.so: Cannot open shared object file: File or directory not found
I cannot migrate Postegresql database to mysql due to this error: psqlodbca.so: Cannot open shared object file: File or directory not found I am using Ubuntu 64 Postgresql 9x and Workbench 6.x, how…
-
0
votes1
answer630
viewsPermission to change only one table column in Postgresql
good night! I’m using Postgresql and in it I have a table called Products. When the user visits a product through the site I give an UPDATE in this table to increase the column visits. The problem…
-
0
votes1
answer276
viewsPostgresql PL/PGSQL function
I have the following function : create function sppreenchecombomunicipio(p_uf text) returns TABLE(MUNICIPIO text, COD_MUNICIPIO int) AS $$ begin return query select tb_municipio.municipio,…
-
0
votes2
answers810
viewsSelect Count Java
I want to select with the Count function and bring all the records of a table, but when presenting the quantity in the textfield, it displays a different result. I’ll put the code in for you to…
-
0
votes2
answers490
viewsXamarin (Visual Studio) x POSTGRESQL
Good evening, you guys, I work in a company of development of commercial automation software, A Alterdata, and today I work directly with Postgresql, and I have a lot of affinity with it. I wonder…
-
0
votes0
answers893
viewsThe pgsql driver is not Currently installed
I’m using the WampServer with the Postgres installed on my local machine and when I access the application occurs the error below: Fatal error: Uncaught Exception 'Zend_db_adapter_exception' with…
-
0
votes1
answer373
viewsJson.parse does not convert to array
Hello, I am a complete amateur in php and javascript and after a month of fighting with two languages I had never touched got here. I am trying to pass a JSON from a request back to array in my…
-
0
votes3
answers814
viewsProblem with accentuation when saving text in the database
Good morning guys, I have the following problem. My system makes changes to a table in the database, if the content is inserted directly by script in postgres, the accent works normally, but when…
-
0
votes2
answers153
viewsSQL - Insert that receives calculated values from other columns of other tables
I want to do an Insert where the sales value column (from the sales table) is filled automatically which will be the unit value(contained in the product table) * quantity (this in the sales table).…
postgresqlasked 7 years ago Elaine Xavier 41 -
0
votes2
answers520
viewsGive a select to return the exclusive values
I have several repeated values, the value can have status (different or different) or I can have two values with different/different status, and I need to compare them (in case I use a key), that…
-
0
votes1
answer123
viewsHow to find the most updated tuple in postgres?
Amigos. I am having difficulty recovering the most current mileage of a vehicle when it arrives at the company. The identification of the tuple is by the date of arrival of the vehicle in the…
-
0
votes0
answers52
viewsTransform the rows of a column - SQL
Someone help me with the following question. Generate ".sql" extension file with script that transforms the lines of a column in a variable string, with its values separated by commas, for example:…
-
0
votes2
answers2255
viewsWhere in a JSON Postgres Array
How can I 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 the…
-
0
votes1
answer290
viewsSequelize Migrate - Error: Typeerror: defineCall is not a Function
Hello I’m doing a simple championship API, I used the Sequelize as ORM for my database. I created the Arbitro table that had only the NAME field and did not have the CPF field in the table. I had to…
node.js postgresql migrations sequelize-jsasked 7 years, 6 months ago Leonardo Nascimento Cintra 175 -
0
votes1
answer43
viewsLayer KML using Openlayers3
I’m starting in Openlayers and I’m having a problem visualizing polygons on maps. I have a set of polygons being returned from a query in the database (postgres/postgis). This set of polygons is…
-
0
votes1
answer605
viewsPostgresql regular expressions
Come on, guys, I need some help I’m trying to make a Rigger in postgresql that checks whether the format of a new data to be inserted into a table is in a certain format, in this case the phone…
-
0
votes1
answer577
viewsWhy can’t I make the connection to Postgresql?
I’m very interested in programming but I’m new in the area and I need to give this work to the teacher. But I can’t solve this mistake. package dal; import java.sql.*; import…
-
0
votes1
answer322
viewsConversion to date Postgresql
Hello, I am working with a database that has date information stored in a varchar(50) as in the following example: "2012 December 2 18:37". I need to do research based on time intervals. However, I…
-
0
votes2
answers710
viewsOperator in postgres function returns SQL Error [42883]: ERROR: operator does not exist: integer = integer[]
I have the following error in a function postgres SQL Error [42883]: ERROR: operator does not exist: integer = integer[] I tried to convert the data to varchar and text but still I could not return…
-
0
votes1
answer91
viewsDoubt 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 =…
-
0
votes2
answers1175
viewsGet Insert ID after pg_query()
I am using php and postgres on a web system, I have a form that I am saving by using the Insert using pg_query, however, I would like to get the id of the new record after inserting, but I am not…
-
0
votes0
answers32
viewsPdostatement::fetch_array()
I’m having a problem at a input of the kind Select (follows the excerpt below). I am using version 7.0 of PHP and as DBMS Postgresql. I tried to use the function pg_fetch_array but it was…
-
0
votes2
answers1581
viewsFunction with Insert according to a select that returns a list of ID’s - Postgresql
I need to make a Rigger after insert calling a function that takes the last record inserted into a certain table and inserts the ID of that last record into another table according to a select that…
-
0
votes1
answer150
viewsExercise involving Function in Postgresql
The question would be as follows: With the following Bank: Telefone (id, numero, operadora_id) Cliente (id, cpf, nome, rg, sexo, uf) Operadora (id, nome, cnpj) Contrato(id, cliente_id, telefone_id,…
-
0
votes1
answer350
viewsCondition and loop within a function
I am creating a function to exit the stock, where v_saldo_item_peps is a function that returns a table, with the items that have balance, in their respective entries. I need to check whether…
-
0
votes0
answers56
viewsRestore from Postgree Backup
When I restore a backup in Postgree’s "pgadmin", if the database tables contain records, it gives error. Is there any possibility of me creating a backup and at the time of restoration, I inform…
postgresqlasked 6 years, 10 months ago Master JR 1,853 -
0
votes2
answers61
viewsMake a SQL language design that returns the number of clients who have no business done
I can not solve this issue, I want it to show number of customers without repeating primary key, no realized deals and show a warning if customers have done business. There was this mistake here.…
-
0
votes2
answers1404
viewsHow to give permissions to user groups in Postgresql?
*All registered users who are members of the "ACCESS SITE" will have the same permissions. I created a group of users (Group Roles) in Postgresql called "SITE ACCESS" to put all users (Login Roles)…
-
0
votes1
answer341
viewsCatch table name with Trigger/Function in Postgres
I am implementing a simple replication form of two tables or more. I have the table replication which has the table name to be replicated and id. To feed the table replication I have a Rigger in…
-
0
votes1
answer135
viewsDRUPAL: Difficulty Backup and restore
I am new to using CMS Drupal and am having a hard time regarding backup restore. I created a new server to restore the backup I do manually (dump from Postgres and copy from the directory inside…
-
0
votes1
answer432
viewsPagination in PHP and Postgresql
Good evening, I need a pagination made on PHP and Postgresql, I searched the internet but found nothing useful, I tried to apply a PHP/Mysql code but the result was negative. The code I used: if…
-
0
votes1
answer1204
viewsPosgresql has no role with superuser how to create a
When I went to check in postgresql has no superuser as I do to change or create a superuser
-
0
votes1
answer70
viewsHow to not display null values and display values in a row in this condition?
I have 3 tables, a flame custom_values with a field VALUE of the kind TEXT where it receives several types of information, soon I identify each value by the relationship with another table called…
postgresqlasked 7 years, 4 months ago Marcos Henzel 797 -
0
votes1
answer1065
viewsPostgresql function with update returns error when upgrading 2 columns
I am a beginner in postgresql and I have a question that I cannot solve. I made a simple function in the database that updates a record: CREATE OR REPLACE FUNCTION public.teste( p_rec_id_transacao…
postgresqlasked 7 years, 4 months ago LMeira 1