Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id C937A9F986F for ; Mon, 5 Nov 2007 00:36:33 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 05757-02 for ; Mon, 5 Nov 2007 00:36:30 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from ns1.peker.com.pl (181-ego-2.acn.waw.pl [62.121.85.181]) by postgresql.org (Postfix) with SMTP id 25A5C9F986E for ; Mon, 5 Nov 2007 00:36:28 -0400 (AST) Received: (qmail 3800 invoked by uid 540); 5 Nov 2007 04:43:04 -0000 Received: from 83.143.210.69 by ns1.peker.com.pl (envelope-from , uid 401) with qmail-scanner-1.25st (clamdscan: 0.82/760. spamassassin: 3.0.2. perlscan: 1.25st. Clear:RC:0(83.143.210.69):SA:0(-2.6/7.5):. Processed in 4.214817 secs); 05 Nov 2007 04:43:04 -0000 Received: from host69-83-143-210.limes.com.pl (HELO ?192.168.1.2?) (informatyka-adamr@83.143.210.69) by ns1.peker.com.pl with SMTP; 5 Nov 2007 04:43:00 -0000 Message-ID: <472E9D95.7090902@informatyka.gdansk.pl> Date: Mon, 05 Nov 2007 05:35:33 +0100 From: =?ISO-8859-2?Q?Adam_Rad=B3owski?= User-Agent: Thunderbird 2.0.0.4 (X11/20070604) MIME-Version: 1.0 To: pawan shirbhate CC: pgsql-interfaces@postgresql.org Subject: Re: Error : could not send data to server: Error 0 References: <65f669c80710250347u71041650o12770fb85b230d4b@mail.gmail.com> <4727040F.3030903@informatyka.gdansk.pl> <65f669c80710300602u480a40bcmea98f53e7d3dc7fd@mail.gmail.com> In-Reply-To: <65f669c80710300602u480a40bcmea98f53e7d3dc7fd@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/3 X-Sequence-Number: 6647 ...and I'm compiling libpq without any special flags, becouse my programs are installed on not only by me installed clients and servers, on shipped with Linux distributions of PostgreSQL, so I have to "keep standards". Regards Adam pawan shirbhate pisze: > Hi Adam, > > Thanks for your suggestion. > > I am not getting that error when I tried to send data in smaller part. > But, the same program with 150000 records is running fine on Solaris 10 > (Sparc processor). > > "could not send data to server: Error 0" - This error is thrown by libpq. > > Is there any platform specific flags required to build libpq on x86 > based OS? > > Regards, > Pawan > > On 10/30/07, *Adam Radlowski* > wrote: > > Maybe it's not good advice, but maybe You should divide Your data into > smaller parts ? > Brgds > Adam > > pawan shirbhate wrote: > > Hi, > > > > I am getting following error while sending the 15000 records using > > PQputline() to postgreSQL DB. > > > > *could not send data to server: Error 0* > > > > Code snap:- > > > > strBuf = > > "abc1798,2,26120,34760,653,869,60880,1522,05/24/2007,123456712"; > > strBuf += "\n"; > > printf("\n%s\n", strBuf.c_str()); > > > > for(i=0;i<15000;i++) > > { > > /* Send a single row */ > > copy_result = PQputline(conn, strBuf.c_str()); > > if(copy_result != 0) > > { > > printf("\n%s\n", PQerrorMessage(conn)); > > } > > > > } > > > > copy_result = PQendcopy(conn); > > if(copy_result != 0) > > { > > printf("\n%s\n", PQerrorMessage(conn)); > > } > > > > Platform - Solaris 10 (x86 based processor) > > PostgreSQL version - 8.2.0 > > Interface - libpq > > Application language - C/C++ > > > > Appreciate help!!! > > > > Regards, > > Pawan > > > > > >