Inserting large number of rows using libpq++ stops responding in c++

From: Taz Master <tazmaster(at)rocketmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Inserting large number of rows using libpq++ stops responding in c++
Date: 2002-12-01 18:17:35
Message-ID: 20021201181735.53975.qmail@web12504.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

postgresql-7.2-103 using libpq++ in c++ program in SuSE Linux 7.2
(i386)

opening dataset using:
dbdata = new PgTransaction(db_server.c_str());
executing SQL statements using:
dbdata->ExecCommandOk( query.c_str() )
forcing data to write when done with:
dbdata->ExecCommandOk( "COMMIT;" );

Executing multiple commands such as:
dbdata->ExecCommandOk( "INSERT INTO playeritems (playerid,
linenumber, level, depot, id, wear, number)VALUES (24725, 102, 3, true,
126, 2, 1);"
(SQL command is actually stored in std::string)

It will execute a number of these commands, 50 to 90 or so, then the
ExecCommandOk will not respond on one. It just never returns. Running
the exact same series of SQL statements it varies on how many it will
execute before locking up.

Upgraded to the lastest postgreSQL in RPM form to try to resolve
(postgresql-7.2-103) with no change.

My only theory as to what might be causing this would be the large
number of SQL commands executed before the commit. Is this right?

Is there another (better?) way to insert data? Or a work around?

This is frustrating and is keeping me from progressing with my
programming. Any solutions/help/suggestions is appreciated.

Regards,

Jim Langston

=====
Taz Master
mailto:tazmaster(at)rocketmail(dot)com

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2002-12-01 18:44:06 Re: Hard-coded PUBLIC in pg_dump
Previous Message Stephan Szabo 2002-12-01 17:53:55 Re: 7.4 Wishlist