Ruslan A Dautkhanov <rusland@scn.ru> writes:
> How to distinguish is PQgetResult(pgConn) return NULL when just no more
> data to process
> OR when hard error occur during fetching data from DB?
An error will give you back an error PGresult object, not null.
regards, tom lane