Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 127769FA198 for ; Tue, 30 Oct 2007 10:08:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 57328-05 for ; Tue, 30 Oct 2007 10:08:07 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.177]) by postgresql.org (Postfix) with ESMTP id E401D9FA26A for ; Tue, 30 Oct 2007 10:08:05 -0300 (ADT) Received: by wa-out-1112.google.com with SMTP id m38so2907549waf for ; Tue, 30 Oct 2007 06:08:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=se1WVo5s/F4MFiW2vcIP0ma+uAS+U0dWzMdIegjZ0Fg=; b=IQpDX3Gz7T80yRwB91e04f/zTwbNzh1CL1Y02AtoqauFCZk9x3qP/SUd9IrRM5YZYtWTQIzHzuBTEFEyOVqBYS63+LeXzCiKP9CVEeeCgmP0uDevvbgzhMtVjPXPwgtuMGzu6QdIfhT+RA/VbtUz3yks1bd8KvYqj0CnhSAcrMs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=X+gTKt4jdsx9V+wnnH4O8LkzCDwsjVTIoSmIXJynmSecKQUI4/g4dJbo63M+Eumy+4x8OjgVtcpYEMeeDXk37upDKmqGhpwdwWfmTfKP2r/3w+vB4AYAqDhzH5Ye3w/e3ptkDOmuU2Iyx83nl0Gh8QD8h6g95olhTO1S6HHtxKY= Received: by 10.114.89.1 with SMTP id m1mr8207209wab.1193749320853; Tue, 30 Oct 2007 06:02:00 -0700 (PDT) Received: by 10.114.133.4 with HTTP; Tue, 30 Oct 2007 06:02:00 -0700 (PDT) Message-ID: <65f669c80710300602u480a40bcmea98f53e7d3dc7fd@mail.gmail.com> Date: Tue, 30 Oct 2007 18:32:00 +0530 From: "pawan shirbhate" To: "Adam Radlowski" Subject: Re: Error : could not send data to server: Error 0 Cc: pgsql-interfaces@postgresql.org In-Reply-To: <4727040F.3030903@informatyka.gdansk.pl> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1040_13980595.1193749320843" References: <65f669c80710250347u71041650o12770fb85b230d4b@mail.gmail.com> <4727040F.3030903@informatyka.gdansk.pl> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/1 X-Sequence-Number: 6645 ------=_Part_1040_13980595.1193749320843 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 > > > > > > ------=_Part_1040_13980595.1193749320843 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
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 <adamr@informatyka.gdansk.pl> 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
>
>


------=_Part_1040_13980595.1193749320843--