Questions tagged as 'postgresql'

1
answer

Use a variable within a query of a DBLINK

I would like to ask you the following, is it possible to use a variable to filter the information that comes from a query of a DBLINK ?. Something like this: SELECT * FROM ( SELECT * FROM dblink('dbname=db port=5432 host=dbhost user=dbuser pa...
asked by 15.01.2018 / 18:41
1
answer

Create a trigger for a bitacora in postgresql and get data from 2 different tables after a delete

Hello, my problem is as follows I have two tables which are called connection and this has the following columns boxnum (pk) | date | partnum boxnum is the pk then there is the market table that has the following fields boxnumm (PK)...
asked by 11.01.2018 / 00:59
0
answers

Set value within json postgresql 9.4

I have the following problem: I need to do an update within json with the aim of changing " typedata " to a new value that is given to me. { "nametable":"venta", "data":"name":"1", "cols":"Tienda":"typedata":"varchar" }, "Fecha":"typedat...
asked by 23.01.2018 / 20:58
0
answers

Error 42601 when executing a stored procedure in C # with PostgreSQL

I am trying to create a method that executes a stored procedure that allows me to insert records in a table. However, I get an error preventing the method from running. This is the code: public bool Insertar(string nombre) {...
asked by 22.12.2017 / 10:49
1
answer

Place in the same field where different value [closed]

I have the following query: (SELECT sno_hpersonalnomina.codnom, count(distinct(sno_hpersonalnomina.codper)), trunc(cast(sum(ABS(sno_hsalida.valsal)) as numeric), 2) as asigna from sno_hpersonalnomina inner JOIN sno_hsalida ON sno_hpersonalnom...
asked by 26.12.2017 / 21:38
1
answer

IF with Extending SQL in PostgreSQL Stored Procedure

I try to do this in postgres CREATE OR REPLACE FUNCTION public.busqueda_productos(_parametro character varying,_descripcion character varying,_estado character varying) RETURNS SETOF productos AS $BODY$ IF ($1 ='General' )then SELECT *...
asked by 17.12.2017 / 21:32
1
answer

How to identify a post database database with hibernet?

Good afternoon, I have the following problem I need to send an email to a specific user within my database, that user is in a specific scheme different from the pubic scheme. How can I identify the scheme that the user belongs to? Curre...
asked by 18.12.2017 / 23:35
1
answer

I need to keep track record in postgresql

I am doing a database design in postgresql and I need to take the history of the patients, which can go through several categories, the complicated thing is that all the time I must know what were the data that the patient had in each category ,...
asked by 12.12.2017 / 20:48
0
answers

Django filtering last JSONField object

I'm trying to make a filter of a JSONField that has the following data: [ { "date": "2017-12-02T11:39:07.447677", "staff": "payment_in_process" }, { "date": "2017-12-02T11:39:12.700590", "state": "ASSIGNING", "staff":...
asked by 15.12.2017 / 17:08
0
answers

date / time field value out of range: "0000-00-00 00:00:00"

SELECT dblink_exec('dbname=sie7IAG110527A74', ' INSERT INTO public.catalogo_maestro( id, codigo, tipoc, nombre, tipo, ctamayor, idrubro, afectable, "timestamp", status, idctasup, naturaleza, idbitacora, tipoc2) VALUES (1,''_GLOBAL'',N...
asked by 07.12.2017 / 23:27