Questions tagged as 'postgresql'

2
answers

SQL - insert that receives calculated values from other columns of other tables

I want to make an insert where the sales_value column (of the sales table) is automatically populated which will be the value (contained in the products table) * the quantity (this in the sales table). Does anyone know how to do this?     
asked by 07.11.2017 / 13:32
1
answer

Function PostgreSQL

I need to create a Function() in my database PostgreSQL so that every time a INSERT or UPDATE is moved in a given table, I activate that function through a TRIGGER so that in my table of contents log is stored...
asked by 08.09.2017 / 18:51
1
answer

Save image to database and give restore in database with PostgreSQL

What is the best way to save image to the PostgreSQL database? Currently I have an OID to save, I can use it normally, both to save and to recover, but when I go to restore in my database, the following error occurs pg_restore: [arquiva...
asked by 07.09.2017 / 15:59
2
answers

Subquery in Java HQL

Hello, I'm in a project that uses geolocation and I'm doing a feature to list the stores closest to the location chosen by the user. I'm using the PostgreSQL database and did this query to perform the search: SELECT ID, CIDADE, CNPJ, DESCRICA...
asked by 07.09.2017 / 22:31
1
answer

Problem inserting Bytea in postgreSQL

I made this update to update a column in my company table, my column in the database is of type bytea and I am saving an image as a byte [] ... in my company class, I have the variable is of type Byte [] Foto public int Update(c...
asked by 12.09.2017 / 15:00
2
answers

PostgreSQL Currency Conversion

I need to convert a value $1,500,35 (American standard) to R$1.500,35 (Brazilian standard), but the language used in the bank is American and the functions I know only convert the value to the bank's current language. How can I do...
asked by 15.09.2017 / 15:45
3
answers

Doubt with insert in the bank Postgres

I have an error message, I tried several options of not getting a solution. Is there a missing configuration?     
asked by 28.08.2017 / 16:21
1
answer

Write app data developed with react-native to a remote PostgreSQL database

I'm developing a react-native application. In this application you will basically have some forms to register information, however this information should be saved in a PostgreSQL bd which is already used by a system. Searching I found the...
asked by 28.08.2017 / 20:28
1
answer

Error connecting PostgreSQL to CodeIgniter? [closed]

PostgreSQL connection error with CodeIgniter:        
asked by 09.09.2017 / 16:14
1
answer

Connect PgAdmin via SSH Google Cloud

Good, next folks. I have a server in the Google Cloud, and I installed the postgres and everything is ok, it's working beauty, there in my machine I installed pgAdmin III and I made the configuration to connect with the bank, initially it worked...
asked by 19.08.2017 / 04:27