Questions tagged as 'postgresql'

2
answers

How to modify this query in SQL

I have this query in SQL: SELECT datname FROM pg_catalog.pg_database WHERE LOWER(datname) = LOWER(BaseDatos); But I am running it from java with jdbc, and I need to pass the result of the query to a ResultSet, but the problem is that when t...
asked by 06.06.2018 / 04:37
0
answers

Problem connecting postgresql with laravel

I have a problem to make the connection between laravel and postgresql, in the .env file for the part of the database I have the following data: DB_CONNECTION=pgsql DB_HOST=127.0.0.1 DB_PORT=5433 DB_DATABASE=candyucab DB_USERNAME=admin DB_PASS...
asked by 04.06.2018 / 02:34
1
answer

Help with select based on SQL criteria, and postgresql

I'm trying to make a query with sql under one criterion Well, let me introduce the code. include_once "conexion.php"; /* Ejecuta una sentencia preparada pasando un array de valores */ $id = 1; $sql = "SELECT * FROM users WHERE...
asked by 04.06.2018 / 03:35
1
answer

Problems when creating a record with Go and Postgresql from GORM Data type time.Time

When I try to send information from POSTMAN, I get an error with dates Error Line: err: = json.NewDecoder (r.Body) .Decode (& amp) ERROR: {"message": "Error reading the data of the entities to be registered: parsing time \" 2012-12-...
asked by 05.06.2018 / 15:33
0
answers

Help with a query group data

Hello I have a database and I want to group some data, the database is structured as follows Lote | Surtio | Lugar | Fecha All are string type, and I have the following query SELECT surtio , lote FROM filtrado where linea = 'pi...
asked by 01.06.2018 / 17:49
0
answers

Error Connection Postgres Codeigniter

I am creating a new connection to connect to a server with codeigniter. here database.php $db['newdb'] = array( 'dsn' => 'pgsql:host=192.xxx.x.xxx;port=5432;dbname=namedb', 'hostname' => 'localhost', 'username' => 'user'...
asked by 21.06.2018 / 21:45
0
answers

Error making query in php, postgresql Database error: Error 989 Session Halted

I am currently working with a php system, when I click on the link to see detailed information on the table, I get the following error: Database error: Invalid SQL: SELECT * FROM tabla WHERE campo = '' Error989 Session halted. I'...
asked by 25.05.2018 / 17:10
0
answers

Error in date format in python

I have a function in python that is responsible for recognizing the date of a text file that reads, the date format to read is this for example: May 28 00:00 , I have changed the orders according to python but it gives me an error : Type...
asked by 29.05.2018 / 19:05
0
answers

Error when inserting a Postgresql record

I have my created function which receives parameters and I want to insert them in my product table but I get an error CREATE OR REPLACE FUNCTION insertarProducto(_codigo character,_descripcion CHARACTER VARYING,_precio MONEY,_stock INTEGER,_fe...
asked by 29.05.2018 / 21:44
1
answer

Query to select certain columns that meet the condition

I have the following table: create table prof_est(id_est int, id_prof int, id_curso int, periodo varchar); id_est corresponds to the student id id_prof is the identification of the teacher who is dictating the subject id_curso is the identi...
asked by 20.05.2018 / 03:22