Re: Error : could not send data to server: Error 0

From: Adam Radłowski <adamr(at)informatyka(dot)gdansk(dot)pl>
To: pawan shirbhate <pawanshirbhate(at)googlemail(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Error : could not send data to server: Error 0
Date: 2007-11-05 04:35:33
Message-ID: 472E9D95.7090902@informatyka.gdansk.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

...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* <adamr(at)informatyka(dot)gdansk(dot)pl
> <mailto:adamr(at)informatyka(dot)gdansk(dot)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
> >
> >
>
>

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Francisco Figueiredo Jr. 2007-11-06 18:27:29 Npgsql2 beta1 released!!
Previous Message Adam Radłowski 2007-11-05 04:30:33 Re: Error : could not send data to server: Error 0