Questions tagged as 'postgresql'

2
answers

What is the best way to store videos, audios, images, documents in a bank?

I want to create a repository system where people can store videos, audios, pdfs, images, etc. I will probably use PGSQL and wonder what the best strategy for storing this data is that it may be different in size and type. Thanks in advance....
asked by 09.03.2018 / 16:14
1
answer

How popular is a postgres table with JSON?

I'd like to populate my tables with Json. But I can not. Does anyone have a solution? Follow JSON: link     
asked by 16.05.2018 / 01:25
1
answer

display jpg image saved in bank (oid) postgresql for html

I saved an image in the postgresql database with the type OID and now I want to display this image on an html page tagged. I checked that through lo_export I can send to a folder and read from there, but I wanted to read it directly without havi...
asked by 10.04.2018 / 23:16
1
answer

update table column - postgresql

I'm new to pgSQL ... I use version 9.5.0 and need to update a column every time a new record is inserted. The column must be populated from the values entered in area_pol and area_ofi. I'm trying to create this function to meet my need:...
asked by 29.03.2018 / 21:46
1
answer

Save formula postgresql

I have the following query UPDATE teste SET equacao = 'X*254/1024+15.2', zerar = False, MinValid = 0.00 WHERE id = 1 RETURNING * It runs normally, but when I get to the database the plus + sign disappears: X*254/10...
asked by 15.02.2018 / 20:54
1
answer

How to leave my bank in postgres always tidy?

I'm doing a page search system where I'll always do the following query in the database: 'SELECT title FROM pages ORDER BY title ASC OFFSET' +iniciaL + 'FETCH FIRST 32 ROWS ONLY' I choose an initial OFFSET and always get the next 32. But I...
asked by 06.03.2018 / 16:09
1
answer

Calculating Easter date in PostgreSQL

I was installing some functions in postgresql with mysqlcompact and I came up with the idea of developing a function that calculated the day of Easter so I did a search, but how do I convert this logic below to run psql postgreSQL? > FUN...
asked by 05.03.2018 / 22:49
2
answers

Create a VIEW or a new TABLE in Postgres?

Hello! I have a situation ... I have a table that will have about 3 * 10 ^ 12 lines (3 trillion), but with only 3 attributes. In this table you will have the IDs of 2 individuals and the similarity between them (it is a number between 0 and 1 th...
asked by 06.03.2018 / 11:55
1
answer

Restore of only one table - Postgresql

How can I restore only one table from one bank to another? I created the table backup from the following command in the CMD: pg_dump -f C:\Backup\Backup_table.backup -t public.lotesretornosuprimento -d BancoDados But I'm not finding how...
asked by 19.02.2018 / 19:43
1
answer

Error installing psycopg2 in a virtualenv environment with pypy

I installed the pypy of the following form: wget https://bitbucket.org/pypy/pypy/downloads/pypy3-v5.10.1-linux64.tar.bz2 tar xf pypy3-v5.10.1-linux64.tar.bz2 virtualenv -p ~/pypy3-v5.10.1-linux64/bin/pypy my-pypy-env...
asked by 21.02.2018 / 14:54