pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Keary Suska <hierophant@pcisys.net>
Cc: Postgres-Interfaces <pgsql-interfaces@postgresql.org>
Subject: Re: libPQ -Canceling Blocking Calls
Date: Thu, 10 Jul 2008 17:05:27 -0400
Message-ID: <14296.1215723927@sss.pgh.pa.us> (raw)
In-Reply-To: <C49BC87F.25E61%hierophant@pcisys.net>
References: <C49BC87F.25E61%hierophant@pcisys.net>

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



view thread (3+ messages)  latest in thread

Message-ID: <14296.1215723927@sss.pgh.pa.us>
Permalink:  ../14296.1215723927@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14296.1215723927@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, hierophant@pcisys.net
  Subject: Re: libPQ -Canceling Blocking Calls
  In-Reply-To: <14296.1215723927@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox