Questions tagged as 'postgresql'

3
answers

Find information from the bank table with PHP every 10 minutes [closed]

I need to fetch information from a database table every 10 minutes using PHP language. Does anyone have any idea how I can do this?     
asked by 21.03.2015 / 16:56
0
answers

PgAdmin4 - Data Output empty

I installed PgAdmin 4 on my machine with windows 10 64bit, I configured the server, but when I open a table the query seems to execute normally, but the Data Output tab does not show anything, neither columns nor data, everything is in white....
asked by 06.02.2017 / 13:47
1
answer

How to make an INSERT in postgresql with conditional default value?

We have the following simplified table for the example: create table teste( id serial not null ); The following commands cause syntax error: insert into teste( select (case when 1=1 then DEFAULT end) );...
asked by 15.02.2017 / 15:13
0
answers

PostgreSQL Backup Error: Exit code 1

I'm trying to backup a bd in postgresql - first when I open it always makes an automatic restoring that never ends Tryingtobackup Givemethisanswer,anddonotbackupthebank     
asked by 30.01.2017 / 22:14
1
answer

Delete records dynamically in SQL

I need to delete multiple table data in different SGDB types, but I do not know how to do this in a practical way. I need to keep 10 records in the tables and I need to delete all the remaining ones, but I can not do this with the command:...
asked by 11.01.2017 / 20:26
1
answer

pg_dump with plink.exe (putty)

I need to run some ssh commands on my linux server, from a windows machine via cmd. For this I am using plink.exe Command: plink -ssh [email protected] -pw 12345 -m script Script: pg_dump -U master dados -v -Fc -f /sistema/dados...
asked by 28.12.2016 / 19:55
1
answer

PostgreSQL: ERROR: operator does not exist: bigint ~~ * unknown

I am making a filter with pagination in cakephp, however when I type a phone number to search, it returns the following error:    Error: SQLSTATE [42883]: Undefined function: 7 ERROR: operator does not exist: bigint ~~ * unknown LINE 1: ......
asked by 28.12.2016 / 12:23
1
answer

Mark lines where balance sum = 0

I have a table like this below, with the date, num, debit value, credit value, and balance sheet value (debit value + 0 - credit amount) and I need every time there is a value of debit and credit and the same document number, which are the same,...
asked by 19.12.2016 / 16:04
1
answer

syntax CAST sql command

I'm doing an INSERT through netbeans. I would like to know if anyone can tell me what the correct CAST syntax is when you need to convert two values to the same command. I tried insert into (minha tabela) (nome, senha) values cast(? as cha...
asked by 06.01.2017 / 19:47
1
answer

Transfer table columns in JSON in Postgres Trigger

I am creating a trigger in Postgres and would like to turn all columns into JSON to insert into a single column of the 'LOG' table, I would like to for example 'OLD. *' in JSON and add it in the oldvalue column 'of the LOG table. create table...
asked by 12.12.2016 / 19:34