Questions tagged as 'postgresql'

1
answer

Creating generic log table for various Django models

I have 30 models. Each one contains information from a calculator and each record is information from sub calculators. I need to create a table of logs of each calculation made by the user. Currently I'm saving JSON what the guy says and savi...
asked by 29.10.2018 / 16:18
1
answer

Django map dynamically generated tables by another application

I will develop an application with Django where you will need to query data in a database that is powered by an ERP (desktop). This ERP generates some movement tables by adding at the end of the table name the month and the year, as a kind of...
asked by 02.10.2018 / 03:05
1
answer

Problem Query Beego

I'm having trouble setting up a Query on Go, using the Beego framework. Error:    2018/12/20 09: 21: 32.104 [C] [asm_amd64.s: 522] Handler crashed with error runtime error: invalid memory address or nil pointer dereference   2018/12/20 09:...
asked by 20.12.2018 / 12:33
1
answer

Error importing Postgreen bank

I have a database to import, it is native to Postgre and has a .sql extension, I am trying to import it into PgAdmin4 but I can not do it at all. There is an image of the error.     
asked by 11.06.2018 / 21:08
1
answer

Consultation to calculate the number of female and male students

In this query would I use GROUP BY ? This is the template     
asked by 17.05.2018 / 05:15
1
answer

Problems stopping tables with UNION

I'm trying to get the top 3 from my table and also the last 2 placed, SITE TO RUN SCRIPT This is my current progress that does not work SELECT ('Podium: ' ||TEAM) as name FROM LEAGUE ORDER BY position ASC LIMIT 3; UNION ALL SELECT ('D...
asked by 17.04.2018 / 19:48
1
answer

Select number of rows returned

Is it possible to select the number of rows returned in a select? For example: In this case it would have to be returned 12.     
asked by 12.03.2018 / 17:34
2
answers

Returning the total with the date in a query with SUM

I need to return a sum of the value field of table m and along with it the date of the initial field of the field sale_date , being it has an aggregate function error: SELECT sum(m.value), t.sale_date from t_transaction t left...
asked by 17.01.2018 / 18:10
1
answer

PostgreSQL Download Script Shell

I am writing a code in Shell Script to download the source code of the latest updated version of PostgreSQL by checking the link to the current version automatically. So based on this I did the following: I created the variable URL_PKG...
asked by 05.03.2018 / 08:07
2
answers

Select with wrong result

I have the following select: SELECT suprimento, public.tiposuprimento.descricao, capacidade, count(public.estoque.codigosuprimento) quantidade,estoqueminimo, sum (valorunitario) valor FROM public.estoque,public.tiposuprimento, public.suprimen...
asked by 06.02.2018 / 18:59