Questions tagged as 'postgresql'

0
answers

How do I get a file from within the database?

I'm using postgresql as sgdb, and I'm saving .txt files in bd, so far, all right, it's already working fine, but I'm not finding a way to get the contents of the txt files saved in bd, I'm using php with PDO for connection to bd The type of c...
asked by 30.03.2016 / 00:48
1
answer

About Trigger in postgres

Well, I have a problem with the following: I want to do a table partitioning in postgres because a table has zillions of records and it takes a long time to fetch it (this table tends to grow considerably in the coming months) and a solution tha...
asked by 12.03.2016 / 19:18
1
answer

Extracting postgreSQL data to file

I'm trying to extract the data from a table to a file with the following command: COPY historico TO '/home/jessica/teste.txt'; But the following error occurs:    ERROR: could not open file "/home/jessica/teste.txt" for writing:   Permiss...
asked by 14.03.2016 / 15:12
0
answers

Problems connecting php to postgresql remotely

I'm trying to connect postgreSQL remotely to PHP on an Apache server. On my local machine I can run the connection without any problem. The point is it's not working remotely. I am running the same code that ran on another instance of the sam...
asked by 24.03.2016 / 14:30
0
answers

How to record and display images using PostgreSQL and Laravel 5.1

I have the following code in my Controller to save the image to the database, there is no error so I think it works fine. $data = Input::file('assinatura'); $escaped = bin2hex($data); $tecnico->assinatura = $escaped; $tecnico->save();...
asked by 16.02.2016 / 13:20
1
answer

Group data by age

Well I have a database that contains professions, people, and sex I wanted to group by age group and by profession and sex and make a calculation of them. problem repeats several bands for example the profession has four lines of F sex, wi...
asked by 15.02.2016 / 13:57
1
answer

psycopg2.pool.SimpleConnectionPool, Exception OperationalError takes time to be thrown

I did a test, shut down the server and called the psycopg2.pool.SimpleConnectionPool method, the method is waiting for a response for a very long time, about a minute, only then it raises the OperationalError exception. This is nor...
asked by 21.01.2016 / 20:36
0
answers

Copy a record from a database with several related tables

I am trying to copy a record from a database table database, but the problem is that this table has many foreign key bindings. The record should involve some 40 tables. Is there any way I can do this? I just need to duplicate the registry by cha...
asked by 05.02.2016 / 18:55
1
answer

Error in the android application when fetching data in postgreSQL database via WebServices with Ksoap2

First I made a WebService using axis 2, where the class has the connection to the database, and the class with requestsDAO with CRUD. Using SoupUI I can carry out the call of the methods. So, I created an android application to consume these ser...
asked by 14.12.2015 / 15:42
1
answer

change field type of all tables

Is there any way to go through the tables in a database by changing all the columns of a given type? type used now DOUBLE PRECISION desired type NUMERIC     
asked by 11.12.2015 / 13:21