Re: [GENERAL] Error at dynamic generated copy...

2016-08-12 Thread Adrian Klaver
On 08/12/2016 09:34 AM, Edmundo Robles wrote: don't worry. I still working in this copy, how can i do to insert newlines to generate the copy dynamically and avoid the syntax error. I think there is a bigger problem. From one of attempts: ERROR: cannot COPY to/from client in PL/pgSQL

Re: [GENERAL] Error at dynamic generated copy...

2016-08-12 Thread Edmundo Robles
don't worry. I still working in this copy, how can i do to insert newlines to generate the copy dynamically and avoid the syntax error. On Fri, Aug 12, 2016 at 11:11 AM, Adrian Klaver wrote: > On 08/12/2016 08:15 AM, Edmundo Robles wrote: > >> Adrian, your'e right, the real problem is

Re: [GENERAL] Error at dynamic generated copy...

2016-08-12 Thread Adrian Klaver
On 08/12/2016 08:15 AM, Edmundo Robles wrote: Adrian, your'e right, the real problem is the slow insert, I have many devices reporting to the server and saving their state each minute so there is a moment where i reach the limit of connections and the monitor device send a exception and

Re: [GENERAL] Error at dynamic generated copy...

2016-08-12 Thread Adrian Klaver
On 08/12/2016 08:15 AM, Edmundo Robles wrote: Adrian, your'e right, the real problem is the slow insert, I have many devices reporting to the server and saving their state each minute so there is a moment where i reach the limit of connections and the monitor device send a exception and

Re: [GENERAL] Error at dynamic generated copy...

2016-08-12 Thread Edmundo Robles
Adrian, your'e right, the real problem is the slow insert, I have many devices reporting to the server and saving their state each minute so there is a moment where i reach the limit of connections and the monitor device send a exception and crash. The table grows a lot, current have

Re: [GENERAL] Error at dynamic generated copy...

2016-08-12 Thread Adrian Klaver
On 08/12/2016 07:11 AM, Edmundo Robles wrote: Hi! I hope you could help me... I tried to generate the next copy instruction in a function: copy tablefoo (id_foo, foo_name, foo_lastname, foo_age) FROM stdin DELIMITER as '|' ; 12060157|John|Doe|33 \. ** The commands to generate the copy ar

Re: [GENERAL] Error at dynamic generated copy...

2016-08-12 Thread Adrian Klaver
On 08/12/2016 07:11 AM, Edmundo Robles wrote: Hi! I hope you could help me... I tried to generate the next copy instruction in a function: copy tablefoo (id_foo, foo_name, foo_lastname, foo_age) FROM stdin DELIMITER as '|' ; 12060157|John|Doe|33 \. ** The commands to generate the copy ar

[GENERAL] Error at dynamic generated copy...

2016-08-12 Thread Edmundo Robles
Hi! I hope you could help me... I tried to generate the next copy instruction in a function: copy tablefoo (id_foo, foo_name, foo_lastname, foo_age) FROM stdin DELIMITER as '|' ; 12060157|John|Doe|33 \. ** The commands to generate the copy are: CREATE OR REPLACE FUNCTION insert_tablefo