Updated on 2024-05-07 GMT+08:00

PQgetCancel

Description

Creates a data structure that contains the information required to cancel a command issued through a specific database connection.

Prototype

PGcancel* PQgetCancel(PGconn* conn);

Parameters

Table 1 PQgetCancel parameter

Keyword

Description

conn

Points to the object pointer that contains the connection information.

Return Values

PGcancel points to the object pointer that contains the cancel information.

Precautions

PQgetCancel creates a PGcancel object for a given PGconn connection object. If the given connection object (conn) is NULL or an invalid connection, it will return NULL. The PGcancel object is an opaque structure that cannot be directly accessed by applications. It can be transferred only to PQcancel or PQfreeCancel.