Questions tagged as 'postgresql'

1
answer

DRUPAL: Difficulty Backup and Restore

I am new to using Drupal CMS and am having a difficulty regarding backup restore. I created a new server to restore the backup I do manually (dump Postgres and copy the directory inside apache). The server is an ORACLE Linux 7.3, APACHE 2, Po...
asked by 10.07.2017 / 19:41
1
answer

Backup and Restore using PostgreSQL in C #

To back up or restore a database through a C # application using the PostgreSQL DBMS, you need to send a command to pg_dump. Is it possible to execute it via a select by sending an ExecuteNonQuery (the same way it executes in SQLSERVER?) Instead...
asked by 17.07.2017 / 20:22
1
answer

Exercise involving Function in PostgreSQL

The question would be: Having 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, plano_id, data_contrato, valor_final) Plano (id, va...
asked by 11.06.2017 / 23:35
0
answers

PDOStatement :: fetch_array ()

I have a problem with a% of type Select (follow the example below). I am using version 7.0 of PHP and as PostgreSQL DBMS. I tried to use the input function but it was unsuccessful, does anyone have any idea what might be wrong? <...
asked by 03.06.2017 / 04:12
2
answers

Function with insert according to a select that returns a list of ID's - Postgresql

I need to make a after insert trigger that calls a function that takes the last record inserted in a certain table and inserts the ID of that last record into another table according to a select that returns several ID's. EX: tb_...
asked by 07.06.2017 / 19:53
2
answers

Operator 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 have tried to convert the data to varchar and text but even then I could not return the require...
asked by 29.05.2017 / 21:37
1
answer

Why can not I connect to PostgreSQL?

I'm very interested in programming but I'm new to the field and I need to deliver this work to the teacher. But I can not resolve this error. package dal; import java.sql.*; import javax.swing.JOptionPane; public class ConectaBd { public s...
asked by 23.05.2017 / 03:23
1
answer

Layer 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 passed via json by an ajax request to the fronte...
asked by 23.05.2017 / 01:33
1
answer

How to select records from a table in the uppercase in postgres?

I need to select all the records in a table where the letters of a particular column are in the uppercase (upper case). Is there a function that differentiates between uppercase and lowercase in POSTGRES ? Here is the image of my table:...
asked by 25.05.2017 / 21:13
1
answer

How to find the most updated tuple in postgres?

Friends. I'm 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 company. At the moment I have the following SQL...
asked by 16.05.2017 / 19:29