pg_isbusy

pg_isbusy — See if pg_getresult will block

Synopsis

pg_isbusy conn

Description

pg_isbusy checks if a result from an asynchronous query submitted by pg_sendquery is ready, or if pg_getresult will block because the result is not yet ready.

Arguments

conn

The handle of the connection to check for readiness.

Return Value

Returns 1 if pg_getresult will block because a result is not yet ready. Returns 0 otherwise, meaning either a result is ready, or there are no pending results.

Notes

This command uses or emulates the PostgreSQL libpq function PQisBusy.