cursor control - Mailing list pgsql-odbc

From Johann Zuschlag
Subject cursor control
Date
Msg-id 43468BBB.3000402@online.de
Whole thread Raw
In response to Re: Compiling with libpq  ("Dave Page" <dpage@vale-housing.co.uk>)
List pgsql-odbc
Hi Dave,

I don't understand the following in qresult.c:

503:        /* Speed up access */
504:        int                     fetch_count = self->fetch_count;

And then:

515:        if (fetch_count < fetch_count)
516:        {
517:                /* return a row from cache */
518:                mylog("next_tuple: fetch_count < fcount:
          returning tuple %d, fcount = %d\n", fetch_count, num_backend_rows);
519:                self->tupleField = the_tuples + (fetch_count * self->num_fields);               /* next row */
520:                self->fetch_count++;
521:                return TRUE;
522:        }
523:        else if (self->num_backend_rows < self->cache_size)

Maybe I'm misled. But  I assume (fetch_count < fetch_count) will never
become true.

Regards
Johann


pgsql-odbc by date:

Previous
From: "Dave Page"
Date:
Subject: Re: CVS Moved
Next
From: "Dave Page"
Date:
Subject: Re: cursor control