Skip site navigation (1) Skip section navigation (2)

Re: libPQ -Canceling Blocking Calls

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Keary Suska <hierophant(at)pcisys(dot)net>
Cc: Postgres-Interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: libPQ -Canceling Blocking Calls
Date: 2008-07-10 21:05:27
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
Keary Suska <hierophant(at)pcisys(dot)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

In response to


pgsql-interfaces by date

Next:From: Keary SuskaDate: 2008-07-10 22:51:45
Subject: Re: libPQ -Canceling Blocking Calls
Previous:From: Keary SuskaDate: 2008-07-10 20:09:03
Subject: libPQ -Canceling Blocking Calls

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group