pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedError : could not send data to server: Error 0
5+ messages / 3 participants
[nested] [flat]
* Error : could not send data to server: Error 0
@ 2007-10-25 10:47 pawan shirbhate <pawanshirbhate@googlemail.com>
2007-10-30 10:14 ` Re: Error : could not send data to server: Error 0 Adam Radlowski <adamr@informatyka.gdansk.pl>
0 siblings, 1 reply; 5+ messages in thread
From: pawan shirbhate @ 2007-10-25 10:47 UTC (permalink / raw)
To: pgsql-interfaces
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
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Error : could not send data to server: Error 0
2007-10-25 10:47 Error : could not send data to server: Error 0 pawan shirbhate <pawanshirbhate@googlemail.com>
@ 2007-10-30 10:14 ` Adam Radlowski <adamr@informatyka.gdansk.pl>
2007-10-30 13:02 ` Re: Error : could not send data to server: Error 0 pawan shirbhate <pawanshirbhate@googlemail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Adam Radlowski @ 2007-10-30 10:14 UTC (permalink / raw)
To: pawan shirbhate <pawanshirbhate@googlemail.com>; +Cc: pgsql-interfaces
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
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Error : could not send data to server: Error 0
2007-10-25 10:47 Error : could not send data to server: Error 0 pawan shirbhate <pawanshirbhate@googlemail.com>
2007-10-30 10:14 ` Re: Error : could not send data to server: Error 0 Adam Radlowski <adamr@informatyka.gdansk.pl>
@ 2007-10-30 13:02 ` pawan shirbhate <pawanshirbhate@googlemail.com>
2007-11-05 04:30 ` Re: Error : could not send data to server: Error 0 =?ISO-8859-2?Q?Adam_Rad=B3owski?= <adamr@informatyka.gdansk.pl>
2007-11-05 04:35 ` Re: Error : could not send data to server: Error 0 =?ISO-8859-2?Q?Adam_Rad=B3owski?= <adamr@informatyka.gdansk.pl>
0 siblings, 2 replies; 5+ messages in thread
From: pawan shirbhate @ 2007-10-30 13:02 UTC (permalink / raw)
To: Adam Radlowski <adamr@informatyka.gdansk.pl>; +Cc: pgsql-interfaces
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
> >
> >
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Error : could not send data to server: Error 0
2007-10-25 10:47 Error : could not send data to server: Error 0 pawan shirbhate <pawanshirbhate@googlemail.com>
2007-10-30 10:14 ` Re: Error : could not send data to server: Error 0 Adam Radlowski <adamr@informatyka.gdansk.pl>
2007-10-30 13:02 ` Re: Error : could not send data to server: Error 0 pawan shirbhate <pawanshirbhate@googlemail.com>
@ 2007-11-05 04:30 ` =?ISO-8859-2?Q?Adam_Rad=B3owski?= <adamr@informatyka.gdansk.pl>
1 sibling, 0 replies; 5+ messages in thread
From: Adam Radłowski @ 2007-11-05 04:30 UTC (permalink / raw)
To: pawan shirbhate <pawanshirbhate@googlemail.com>; +Cc: pgsql-interfaces
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
> >
> >
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Error : could not send data to server: Error 0
2007-10-25 10:47 Error : could not send data to server: Error 0 pawan shirbhate <pawanshirbhate@googlemail.com>
2007-10-30 10:14 ` Re: Error : could not send data to server: Error 0 Adam Radlowski <adamr@informatyka.gdansk.pl>
2007-10-30 13:02 ` Re: Error : could not send data to server: Error 0 pawan shirbhate <pawanshirbhate@googlemail.com>
@ 2007-11-05 04:35 ` =?ISO-8859-2?Q?Adam_Rad=B3owski?= <adamr@informatyka.gdansk.pl>
1 sibling, 0 replies; 5+ messages in thread
From: Adam Radłowski @ 2007-11-05 04:35 UTC (permalink / raw)
To: pawan shirbhate <pawanshirbhate@googlemail.com>; +Cc: 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@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
> >
> >
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2007-11-05 04:35 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-10-25 10:47 Error : could not send data to server: Error 0 pawan shirbhate <pawanshirbhate@googlemail.com>
2007-10-30 10:14 ` Adam Radlowski <adamr@informatyka.gdansk.pl>
2007-10-30 13:02 ` pawan shirbhate <pawanshirbhate@googlemail.com>
2007-11-05 04:30 ` =?ISO-8859-2?Q?Adam_Rad=B3owski?= <adamr@informatyka.gdansk.pl>
2007-11-05 04:35 ` =?ISO-8859-2?Q?Adam_Rad=B3owski?= <adamr@informatyka.gdansk.pl>
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