class PG::Connection

def cancel

On older client library a pure ruby implementation is used.
On PostgreSQL-17+ client libaray the class PG::CancelConnection is used.

error message if a failure occurs.
Returns +nil+ on success, or a string containing the

processed.
Requests cancellation of the command currently being

conn.cancel() -> String
call-seq:
def cancel
	cancon = PG::CancelConnection.new(self)
	cancon.async_cancel
rescue PG::Error => err
	err.to_s
end