Re: Buggy SELEC ... FROM UPDATE ?

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: Pine.LNX.4.21.0104101731180.13990-100000@lothlorien.stunet2.tu-freiberg.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

Browse pgsql-novice by date

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