Inserting large number of rows using libpq++ stops responding in c++ - Mailing list pgsql-general

From Taz Master
Subject Inserting large number of rows using libpq++ stops responding in c++
Date
Msg-id 20021201181735.53975.qmail@web12504.mail.yahoo.com
Whole thread Raw
Responses Re: Inserting large number of rows using libpq++ stops responding in c++
List 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@rocketmail.com


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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Segmentation fault while COPY in 7.3
Next
From: Tom Lane
Date:
Subject: Re: Inserting large number of rows using libpq++ stops responding in c++