Hi all, How to fetch certain number of tuples from a postgres table.
Same I am doing in oracle
using following lines by setting
prefetch attribute. For oracle
// Prepare query // Get statement type // Set prefetch count OCIAttrSet( myOciStatement, OCI_HTYPE_STMT, &prefetch, 0, OCI_ATTR_PREFETCH_ROWS, myOciError ); // Execute query For Postgres
Can you please tell us how set this prefetch attribute in following lines. Is
PQexec
returns all the rows from the table? mySqlResultsPG =
PQexec(connection, aSqlStatement); if((PQresultStatus(mySqlResultsPG) == PGRES_FATAL_ERROR ) || (PQstatus(connection) != CONNECTION_OK)){} Regards Tarkeshwar |