Re: Proposed new libpq API - Mailing list pgsql-hackers

From Chris Bitmead
Subject Re: Proposed new libpq API
Date
Msg-id 3962E446.2792DF31@nimrod.itg.telecom.com.au
Whole thread Raw
In response to Proposed new libpq API  (Chris Bitmead <chrisb@nimrod.itg.telstra.com.au>)
List pgsql-hackers
Follow up: Where it says...

PGresult *res = PQexec("select * from foo");
for (int i = 0; i < PQntuples(res); i++) { printf("%s\n", PQgetValue(res, i, 0);  PQflush(res) // NEW NEW
}

It should say...

PGresult *res = PQexec("select * from foo");
for (int i = 0; i < PQntuples(res); i++) { printf("%s\n", PQgetValue(res, i, 0);  PQflush(res, -1) // NEW NEW
}

The -1 argument signifying "flush everything". A specific number
signifying "flush everything below this threshold", where the threshold
is a tuple number.


pgsql-hackers by date:

Previous
From: Chris Bitmead
Date:
Subject: Proposed new libpq API
Next
From: Philip Warner
Date:
Subject: Re: heap_create with OID?