Questions tagged as 'postgresql'

2
answers

Query to select first record in both PostgreSQL and SQL Server

I need to select the first record of a query. But the problem is that top 1 only works in SQL Server , but not in PostgreSQL . And in PostgreSQL it works with limit but in SQL Server no. These are the examples. I would greatl...
asked by 19.09.2016 / 16:16
2
answers

Nest objects related tables Django API REST Framework

I have 3 related tables, 1 - > 2 - > 3 Now with mysql we would do inner join of the tables and now we could filter by fields of the 3, the thing is that with the REST API I would like to nest all the elements of the 3 related to the 2 rel...
asked by 26.05.2016 / 13:06
1
answer

Error when using OR in JPQL

I ask for your help to help me with a query I'm doing and return me an error. I have tried it with createNativeQuery and with createQuery , but it is generating error; the idea is that it receives a parameter and that it can do the...
asked by 31.05.2016 / 19:48
1
answer

Return All fields in the table (Function PostgreSql)

How can I make a postgresql function or stored procedure return all the columns of the table without having to specify them? I want to achieve the behavior of the Sql Server query Sp. With the code that I show, I get the error ERROR: la list...
asked by 01.04.2016 / 20:29
0
answers

Problems with Springboot, vue and heroku

Hello, create a Springboot project in STS and within a folder called frontend that contains the part with vue I was able to host my CRUD project in heroku, but with some problems: 1) so that the page runs, I had to pass the generated...
asked by 02.01.2019 / 20:31
1
answer

Postgresql -en Date but the expression is character variable- error inserting?

I want to insert from java in postgresql. By bringing (and casting) a java.util.Date to java.sql.Date , it works fine, but at the time of inserting it, it marks me this:    ERROR: the column "fechab1" is of type date but the expr...
asked by 31.12.2018 / 18:41
0
answers

Update content databases on different servers - postgres

I have 2 database servers, one for production and the other for development. What I want to update the development data with the production. The issue is that, in development maybe I have tables that do not yet exist in production, so, I have...
asked by 13.12.2018 / 12:47
0
answers

Mono.dll caused an Access Violation using Npgsql

Using Npgsql and Unity 5.6.2f1 to connect with PostgreSQL and the following code: public bool OpenDB() { string connectionString = "Host=**;Port=**;Database=**;Username=**;Password=**"; // IDbConnection dbcon; ## CHANGE T...
asked by 03.12.2018 / 15:17
3
answers

Problem with date in SQL

My BD manager is postgres. I am simply trying to get a result based on a specific date or a range of dates. I have this table: create table detalle_ventas ( fecha_venta varchar(100) not null, codigo_barra int not null, descripcion varchar(...
asked by 03.12.2018 / 15:09
0
answers

Change of data type of columns in postgresql

Beforehand I appreciate the help, it turns out that in a postgresql database change the data type of a timestap column without time zone by the timestap type with time zone, this change eliminated the part of the date that it was reflected in th...
asked by 30.11.2018 / 00:24