pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adam Radłowski <adamr@informatyka.gdansk.pl>
To: pawan shirbhate <pawanshirbhate@googlemail.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Error : could not send data to server: Error 0
Date: Mon, 05 Nov 2007 05:30:33 +0100
Message-ID: <472E9C69.20102@informatyka.gdansk.pl> (raw)
In-Reply-To: <65f669c80710300602u480a40bcmea98f53e7d3dc7fd@mail.gmail.com>
References: <65f669c80710250347u71041650o12770fb85b230d4b@mail.gmail.com>
	<4727040F.3030903@informatyka.gdansk.pl>
	<65f669c80710300602u480a40bcmea98f53e7d3dc7fd@mail.gmail.com>

I'm not sure, but I think, that it can be problem of x86 architecture, 
not of libpq, becouse I have problems like this with data tables in 
memory, what are "static" in procedures (defined and used in procedures 
only). I'm programming in Pascal (I'm old school programmer knowing 
C/C++, but I have too much old good routines for Pascal). Free Pascal is 
fully compatible with C, so it brings this same problems with all 
things, as in C. When I get memory dynamically, I don't get problem like 
this, but You know - maybe I'm wrong...
Brgds
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@informatyka.gdansk.pl 
> <mailto: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
>      >
>      >
> 
> 



view thread (5+ messages)  latest in thread

Message-ID: <472E9C69.20102@informatyka.gdansk.pl>
Permalink:  ../472E9C69.20102@informatyka.gdansk.pl/
Also on:    postgresql.org/message-id/472E9C69.20102@informatyka.gdansk.pl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: adamr@informatyka.gdansk.pl, pawanshirbhate@googlemail.com
  Subject: Re: Error : could not send data to server: Error 0
  In-Reply-To: <472E9C69.20102@informatyka.gdansk.pl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox