Next: Large Object Support, Previous: Synchronous Interface Functions, Up: SXEmacs PostgreSQL libpq API
Making command by command examples is too complex with the asynchronous interface functions. See the examples section for complete calling sequences.
Begin establishing an asynchronous database connection. conninfo A string containing the connection options. See the documentation of
pq-connectdbfor a listing of all the available flags.
An intermediate function to be called during an asynchronous database connection. conn A database connection object. The result codes are documented in a previous section.
Returns t if
pq-get-resultwould block waiting for input. conn A database connection object.
Consume any available input from the backend. conn A database connection object.
Nil is returned if anything bad happens.
Reset connection to the backend asynchronously. conn A database connection object.
Poll an asynchronous reset for completion conn A database connection object.
Attempt to request cancellation of the current operation. conn A database connection object.
The return value is t if the cancel request was successfully dispatched, nil if not (in which case conn->errorMessage is set). Note: successful dispatch is no guarantee that there will be any effect at the backend. The application must read the operation result as usual.
Submit a query to Postgres and don't wait for the result. conn A database connection object. Returns: t if successfully submitted nil if error (conn->errorMessage is set)
Retrieve an asynchronous result from a query. conn A database connection object.
nilis returned when no more query work remains.
Sets the PGconn's database connection non-blocking if the arg is TRUE or makes it non-blocking if the arg is FALSE, this will not protect you from PQexec(), you'll only be safe when using the non-blocking API. conn A database connection object.
Return the blocking status of the database connection conn A database connection object.
Force the write buffer to be written (or at least try) conn A database connection object.
Start asynchronously passing environment variables to a backend. conn A database connection object.
Compatibility note: this function is only available with libpq-7.0.