Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8578C65032E for ; Thu, 10 Jul 2008 18:05:49 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 32311-06 for ; Thu, 10 Jul 2008 18:05:42 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id C56F665003C for ; Thu, 10 Jul 2008 18:05:45 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m6AL5RgF014297; Thu, 10 Jul 2008 17:05:27 -0400 (EDT) To: Keary Suska cc: Postgres-Interfaces Subject: Re: libPQ -Canceling Blocking Calls In-reply-to: References: Comments: In-reply-to Keary Suska message dated "Thu, 10 Jul 2008 14:09:03 -0600" Date: Thu, 10 Jul 2008 17:05:27 -0400 Message-ID: <14296.1215723927@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/5 X-Sequence-Number: 6763 Keary Suska 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