From: | Dmitry Samersoff <dms(at)wplus(dot)net> |
---|---|
To: | pgsql-hackers(at)hub(dot)org (pgsql) |
Subject: | libpq questuion |
Date: | 1999-02-08 13:08:43 |
Message-ID: | 199902081308.QAA10389@himera.wplus.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
While update table whithin fetch forward loop
cause infinite fetching of updated touple?
(code fragment below cause infinite
displayng record with oid 20864)
----------------------------------------------------------------------------
PQexec(_conn, "BEGIN");
PQexec(_conn, "DECLARE curr1 CURSOR FOR select oid, name from domains;");
while(1)
{
_res = PQexec(_conn, "FETCH FORWARD 1 IN curr1");
if( PQresultStatus(_res) != PGRES_TUPLES_OK ) break;
PQexec(_conn, "update domains set type = 3 where oid = 20864" );
printf("oid: %s name: %s\n", PQgetvalue(_res,0,0),PQgetvalue(_res,0,1));
}
---------------------------------------------------------------------------
--
Dmitry Samersoff
DM\S, dms(at)wplus(dot)net, AIM: Samersoff
http://devnull.wplus.net
From | Date | Subject | |
---|---|---|---|
Next Message | Cary O'Brien | 1999-02-08 13:15:54 | Re: [HACKERS] Problems with >2GB tables on Linux 2.0 |
Previous Message | Michael Meskes | 1999-02-08 12:59:54 | Keywords |