libpq questuion
От | Dmitry Samersoff |
---|---|
Тема | libpq questuion |
Дата | |
Msg-id | 199902081308.QAA10389@himera.wplus.net обсуждение исходный текст |
Ответы |
Re: [HACKERS] libpq questuion
|
Список | 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@wplus.net, AIM: Samersoff http://devnull.wplus.net
В списке pgsql-hackers по дате отправления: