Questions tagged as 'postgresql'

1
answer

Postgres pg_dump How to make a backup with little space

I have a Server Centos 6.9 con Postgres 9.2 and a base that weighs 70 GB I have little space available and I can not add more space . I need to do a backup of the base. The problem is when running the pg_dump...
asked by 05.12.2018 / 22:13
1
answer

Error creating table using Spring Boot and postgres

Greetings to all! I am trying to create an application using Spring and Postgres. Currently I have 3 entities which are: User , Role and UserRole User import lombok.AllArgsConstructor; import lombok.Builder; import...
asked by 19.04.2018 / 21:53
1
answer

Problem in variable connection undefined

The code is this: conn file -> Connection to the database: <?php class conn { //Atributos de la base de datos private $dbname; private $host; private $user; private $pass; private $port; //Métodos publi...
asked by 14.11.2018 / 16:57
5
answers

Connection java Postgres in Netbeans

I would like to ask you a question, the truth is that I am new to this, I am a student of programming and I have a small project. I am currently doing a program where you can store the data of people, in NetBeans. My question is: How do I gen...
asked by 07.04.2016 / 22:18
2
answers

Why do the records in a Postgresql table keep blanks?

Quetal friends, I'm doing a practice with PHP + PDO and postgresql, and I've realized that when I save the data it leaves me blank. I attached an image and this is the code. <?php include_once "conexion.php"; try {...
asked by 30.06.2018 / 18:02
2
answers

Search in a range of ip's, PostgreSQL

I'm doing a query to get ip addresses given a range, for example: Obtain the ip's that are between 192.168.0.0 and 192.168.0.255 The query I'm using is: SELECT dir_ip FROM nic WHERE dir_ip BETWEEN '192.168.0.0' AND '192.168.0.255' ORDER...
asked by 03.08.2016 / 22:27
1
answer

Get a JSON from an SQL query in Postgres [duplicated]

I have several tables with the following data: | sonda | fecha | valor | +-------+-------------------------+--------+ | s1 | 2018-10-23 23:34:00.444 | 34.5 | | s2 | 2018-10-23 23:34:00.444 | 4.5 | | s3 | 2018...
asked by 20.12.2018 / 18:12
2
answers

Is there a way to adapt an SQL statement when a null field arrives?

Hi, I hope you're ok, is there any way to adapt an SQL statement so that it reacts according to whether a parameter arrives nil or not, something like this: drop table if exists tabla; create table tabla ( id int primary key AUTO_INCREMENT...
asked by 21.08.2018 / 18:07
2
answers

Use VIEW in Postgresql

Hello, Good morning! I have encountered a small problem during the SQL class. I've learned how to make a View, but I do not know how to use them. For example: when you did a search to know the names of teachers who have more than two reser...
asked by 11.04.2016 / 18:29
2
answers

Alternative to clause where IN?

If I consult certain data in a query where in , I would bring the data that match. Example: link But my question is, how do I get the data that does not match and throw it in the query? "Data to consult" is a random lis...
asked by 22.10.2016 / 14:57