~psycopg/psycopg/2.0.x

« back to all changes in this revision

Viewing changes to psycopg/pqpath.c

  • Committer: Federico Di Gregorio
  • Date: 2004-12-20 02:32:08 UTC
  • Revision ID: fog-cfffdc3731afbc103b4c35d9978aeeb2ce1fd329
rowcount fix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
353
353
int
354
354
pq_execute(cursorObject *curs, const char *query, int async)
355
355
{
356
 
    int err;
357
 
 
358
356
    /* if the status of the connection is critical raise an exception and
359
357
       definitely close the connection */
360
358
    if (curs->conn->critical) {
410
408
       to respect the old DBAPI-2.0 compatible behaviour */
411
409
    if (async == 0) {
412
410
        Dprintf("pq_execute: entering syncronous DBAPI compatibility mode");
413
 
        do {
414
 
            err = pq_fetch(curs);
415
 
            if (err == -1) return -1;
416
 
        } while (err == 1);
 
411
        if (pq_fetch(curs) == -1) return -1;
417
412
    }
418
413
    else {
419
414
        curs->conn->async_cursor = (PyObject*)curs;