Postgres module

cancel_query

procedure · 1 overloadsince 0.27.0Source

Asks the server to cancel the statement c is running, as libpq's PQcancel does. Meant for another fiber than the one waiting for the statement (a signal handler's, say): the waiting call then returns the server's "canceling statement due to user request". Does nothing useful when no statement is running.

cancel_query :: (c: *Connection) -> Pg_Error

Asks the server to cancel the statement c is running, as libpq's PQcancel does. Meant for another fiber than the one waiting for the statement (a signal handler's, say): the waiting call then returns the server's "canceling statement due to user request". Does nothing useful when no statement is running.

Parameters

c: *Connection
the connection whose statement is to be stopped.

Returns

See also