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


From: Helge Bahmann <bahmann(at)math(dot)tu-freiberg(dot)de>
To: Patrice EspiƩ <patrice(dot)espie(at)free(dot)fr>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Buggy SELEC ... FROM UPDATE ?
Date: 2001-04-10 16:16:15
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On Tue, 10 Apr 2001, Patrice EspiƩ wrote:

> > > Sure, I want to release it : the other users MUST be free to go away
> instead
> > > of being locked if they try to lock anything already locked
> > A solution I have implemented once is to use an application-side timer
> > to cancel the request after a certain timeout; ugly, but doable. What
> > interface to postgres do you use?
> Doable...
> I use ODBC under Windows, but why not the C or C++ interface ? I will use
> the most efficient (if I can decide which one...)
uhh... I know nothing about Windows, but on Unix and libpq you would
simply use alarm(timeout) to initiate the timer and
sigaction(SIGALRM,...) to install a handler for the timer event which can
in turn call PQrequestCancel; I guess Windows and ODBC can't be too
different, but you better ask someone who knows Windows a bit better

note that the current transaction is in 'aborted' state when you cancel a
request, so you will have to "rollback" and "begin" a new one before
sending any other queries

hope that helps

pgsql-novice by date

Next:From: Williams, RyanDate: 2001-04-10 21:42:50
Subject: Version info?
Previous:From: Vijay DevalDate: 2001-04-10 15:55:10
Subject: Re: foreign key violation

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