Re: libPQ -Canceling Blocking Calls - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: libPQ -Canceling Blocking Calls
Date
Msg-id 14296.1215723927@sss.pgh.pa.us
Whole thread Raw
In response to libPQ -Canceling Blocking Calls  (Keary Suska <hierophant@pcisys.net>)
Responses Re: libPQ -Canceling Blocking Calls  (Keary Suska <hierophant@pcisys.net>)
List pgsql-interfaces
Keary Suska <hierophant@pcisys.net> writes:
> Is it possible to use PQcancel() to cancel a blocking call, such as a call
> to PQexec?

Sure.  Look at psql for an example.  You probably need to call PQcancel
from a signal handler, but there's a signal-safe variant for that.
        regards, tom lane


pgsql-interfaces by date:

Previous
From: Keary Suska
Date:
Subject: libPQ -Canceling Blocking Calls
Next
From: Keary Suska
Date:
Subject: Re: libPQ -Canceling Blocking Calls