Thread: async. query processing

async. query processing

From
Ruslan A Dautkhanov
Date:
Hello !

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?

In the docs for PQsendQuery I not see any reference that PQgetResult can
indicate that
error raised. What changed since PG 7? I have a code in a client C
program, that not
work from PG8...

Thanks a lot for any comments

--
Ruslan A Dautkhanov

Re: async. query processing

From
Tom Lane
Date:
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