pg_cancelrequest — Cancel an in-progress asynchronous query
pg_cancelrequest conn
pg_cancelrequest
asks the database server to
abandon processing of the current command issued by
pg_sendquery.
There is no guarantee that the command will actually be canceled. For example, the command may have been completed before the database server can receive and handle the cancel request. If a request is canceled, and you were in the middle of a transaction, the entire transaction is rolled back.
You still need to call pg_getresult repeatedly until it
doesn't return anything, and deal with all the returned result handles,
usually by freeing them with pg_result -clear
.
This command uses or emulates the PostgreSQL libpq
function PQrequestCancel
.
This version of the manual was produced for the
Pgtcl-ng Sourceforge project web service site, which requires the logo on each
page.
To download a logo-free copy of the manual, see the
Pgtcl-ng project
downloads area.