Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 3B60A9FC514 for ; Thu, 25 Oct 2007 08:16:03 -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 64465-07-2 for ; Thu, 25 Oct 2007 08:15:56 -0300 (ADT) X-Greylist: delayed 00:27:30.821931 by SQLgrey-1.7.5 Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.176]) by postgresql.org (Postfix) with ESMTP id D9CE39FC504 for ; Thu, 25 Oct 2007 08:15:53 -0300 (ADT) Received: by wa-out-1112.google.com with SMTP id m38so696312waf for ; Thu, 25 Oct 2007 04:15:52 -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:mime-version:content-type; bh=jh1RLY/C5c7cf5V3mvXvc2f2DGSlJ7l/8yVwMDPlx80=; b=Y2p7eivb8YSYVzhg1Nn0z1YYvLRNC6H8xQKsGlm96snv2scfXqkiltC7hpDWkm4zAUSGwuUywiWfstz44ThljWIjAQhHAQAQUIhaMPJr2cd0V6qgNj+Psb5pbOMJDAgJpGZLho6lc5ZstjHvURVw2DeCsES72Pp0c7h5vXVCh28= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=R4xNouaAzA/MTMd//kFu6lj6XAsoJK9VqJf9PDZ+t2pusI9asNDRjrkqtKhF0RkoB037GUoEf15O/CLXwvl96+u9/BOQQDefX/7XxVsxuRTIlRclAkLFiBaD9krwFeOJbZ5BtKuWS1tCmG5Y6B5k3zM4En9bilCavgWBQLxFsy8= Received: by 10.114.14.1 with SMTP id 1mr1960174wan.1193309246747; Thu, 25 Oct 2007 03:47:26 -0700 (PDT) Received: by 10.114.133.4 with HTTP; Thu, 25 Oct 2007 03:47:26 -0700 (PDT) Message-ID: <65f669c80710250347u71041650o12770fb85b230d4b@mail.gmail.com> Date: Thu, 25 Oct 2007 16:17:26 +0530 From: "pawan shirbhate" To: pgsql-interfaces@postgresql.org Subject: Error : could not send data to server: Error 0 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_729_21821958.1193309246744" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/14 X-Sequence-Number: 6641 ------=_Part_729_21821958.1193309246744 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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_729_21821958.1193309246744 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
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_729_21821958.1193309246744--